Skip to content

Commit 1769830

Browse files
author
Filip Gawin
committed
Implement 018c
1 parent 746b8f7 commit 1769830

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

rwengine/src/script/modules/GTA3ModuleImpl.inl

+16-15
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
#include <script/ScriptTypes.hpp>
2-
#include <script/ScriptMachine.hpp>
3-
#include <script/SCMFile.hpp>
4-
#include <script/ScriptFunctions.hpp>
5-
#include <engine/GameWorld.hpp>
6-
#include <engine/GameState.hpp>
7-
#include <engine/GameData.hpp>
8-
#include <engine/Animator.hpp>
1+
#include <ai/PlayerController.hpp>
2+
#include <audio/SfxParameters.hpp>
93
#include <core/Logger.hpp>
10-
#include <objects/CutsceneObject.hpp>
4+
#include <data/CutsceneData.hpp>
5+
#include <engine/Animator.hpp>
6+
#include <engine/GameData.hpp>
7+
#include <engine/GameState.hpp>
8+
#include <engine/GameWorld.hpp>
119
#include <objects/CharacterObject.hpp>
10+
#include <objects/CutsceneObject.hpp>
1211
#include <objects/InstanceObject.hpp>
1312
#include <objects/ObjectTypes.hpp>
1413
#include <objects/PickupObject.hpp>
1514
#include <objects/VehicleObject.hpp>
16-
#include <ai/PlayerController.hpp>
17-
#include <data/CutsceneData.hpp>
15+
#include <script/SCMFile.hpp>
16+
#include <script/ScriptFunctions.hpp>
17+
#include <script/ScriptMachine.hpp>
18+
#include <script/ScriptTypes.hpp>
1819

1920
#include <boost/algorithm/string/predicate.hpp>
2021

@@ -4280,10 +4281,10 @@ void opcode_018b(const ScriptArguments& args, const ScriptBlip blip, const Scrip
42804281
@arg sound
42814282
*/
42824283
void opcode_018c(const ScriptArguments& args, ScriptVec3 coord, const ScriptSoundType sound) {
4283-
RW_UNIMPLEMENTED_OPCODE(0x018c);
4284-
RW_UNUSED(coord);
4285-
RW_UNUSED(sound);
4286-
RW_UNUSED(args);
4284+
auto world = args.getWorld();
4285+
auto metaData = getSoundInstanceData(sound);
4286+
auto name = world->sound.createSfxInstance(metaData->sfx);
4287+
world->sound.playSfx(name, coord, false, metaData->range);
42874288
}
42884289

42894290
/**

0 commit comments

Comments
 (0)