1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-07 03:12:36 +01:00

Implement 018c

This commit is contained in:
Filip Gawin 2018-08-12 17:26:40 +02:00
parent 746b8f7d20
commit 1769830af0

View File

@ -1,20 +1,21 @@
#include <script/ScriptTypes.hpp> #include <ai/PlayerController.hpp>
#include <script/ScriptMachine.hpp> #include <audio/SfxParameters.hpp>
#include <script/SCMFile.hpp>
#include <script/ScriptFunctions.hpp>
#include <engine/GameWorld.hpp>
#include <engine/GameState.hpp>
#include <engine/GameData.hpp>
#include <engine/Animator.hpp>
#include <core/Logger.hpp> #include <core/Logger.hpp>
#include <objects/CutsceneObject.hpp> #include <data/CutsceneData.hpp>
#include <engine/Animator.hpp>
#include <engine/GameData.hpp>
#include <engine/GameState.hpp>
#include <engine/GameWorld.hpp>
#include <objects/CharacterObject.hpp> #include <objects/CharacterObject.hpp>
#include <objects/CutsceneObject.hpp>
#include <objects/InstanceObject.hpp> #include <objects/InstanceObject.hpp>
#include <objects/ObjectTypes.hpp> #include <objects/ObjectTypes.hpp>
#include <objects/PickupObject.hpp> #include <objects/PickupObject.hpp>
#include <objects/VehicleObject.hpp> #include <objects/VehicleObject.hpp>
#include <ai/PlayerController.hpp> #include <script/SCMFile.hpp>
#include <data/CutsceneData.hpp> #include <script/ScriptFunctions.hpp>
#include <script/ScriptMachine.hpp>
#include <script/ScriptTypes.hpp>
#include <boost/algorithm/string/predicate.hpp> #include <boost/algorithm/string/predicate.hpp>
@ -4280,10 +4281,10 @@ void opcode_018b(const ScriptArguments& args, const ScriptBlip blip, const Scrip
@arg sound @arg sound
*/ */
void opcode_018c(const ScriptArguments& args, ScriptVec3 coord, const ScriptSoundType sound) { void opcode_018c(const ScriptArguments& args, ScriptVec3 coord, const ScriptSoundType sound) {
RW_UNIMPLEMENTED_OPCODE(0x018c); auto world = args.getWorld();
RW_UNUSED(coord); auto metaData = getSoundInstanceData(sound);
RW_UNUSED(sound); auto name = world->sound.createSfxInstance(metaData->sfx);
RW_UNUSED(args); world->sound.playSfx(name, coord, false, metaData->range);
} }
/** /**