1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-22 02:12:45 +01:00

Cover additional opcodes that remove obstacles

This commit is contained in:
Daniel Evans 2019-04-29 22:02:37 +01:00
parent 5bb67eccb4
commit f4fd1f9283

View File

@ -916,6 +916,7 @@ void opcode_0053(const ScriptArguments& args, const ScriptInt index, ScriptVec3
character->applyOffset();
player = static_cast<ai::PlayerController*>(character->controller);
args.getState()->playerObject = character->getGameObjectID();
script::clearSpaceForObject(args, character);
}
/**
@ -940,9 +941,9 @@ void opcode_0054(const ScriptArguments& args, const ScriptPlayer player, ScriptF
@arg coord Coordinates
*/
void opcode_0055(const ScriptArguments& args, const ScriptPlayer player, ScriptVec3 coord) {
RW_UNUSED(args);
player->getCharacter()->setPosition(coord);
player->getCharacter()->applyOffset();
script::clearSpaceForObject(args, player->getCharacter());
}
/**
@ -1889,7 +1890,7 @@ void opcode_00a0(const ScriptArguments& args, const ScriptCharacter character, S
*/
void opcode_00a1(const ScriptArguments& args, const ScriptCharacter character, ScriptVec3 coord) {
script::setObjectPosition(character, coord);
RW_UNUSED(args);
script::clearSpaceForObject(args, character);
}
/**
@ -2024,8 +2025,8 @@ void opcode_00aa(const ScriptArguments& args, const ScriptVehicle vehicle, Scrip
@arg coord Coordinates
*/
void opcode_00ab(const ScriptArguments& args, const ScriptVehicle vehicle, ScriptVec3 coord) {
RW_UNUSED(args);
script::setObjectPosition(vehicle, coord);
script::clearSpaceForObject(args, vehicle);
}
/**
@ -4919,8 +4920,8 @@ void opcode_01bb(const ScriptArguments& args, const ScriptObject object, ScriptF
@arg coord Coordinates
*/
void opcode_01bc(const ScriptArguments& args, const ScriptObject object, ScriptVec3 coord) {
RW_UNUSED(args);
script::setObjectPosition(object, coord);
script::clearSpaceForObject(args, object);
}
/**
@ -9609,9 +9610,9 @@ void opcode_0361(const ScriptArguments& args, const ScriptGarage garage) {
*/
void opcode_0362(const ScriptArguments& args, const ScriptCharacter character,
ScriptVec3 coord) {
RW_UNUSED(args);
character->setCurrentVehicle(nullptr, 0);
character->setPosition(coord);
script::clearSpaceForObject(args, character);
}
/**
@ -9963,6 +9964,7 @@ void opcode_0376(const ScriptArguments& args, ScriptVec3 coord,
pedGroup.at(args.getWorld()->getRandomNumber(0u, pedGroup.size() - 1));
character = world->createPedestrian(model, coord);
character->applyOffset();
script::clearSpaceForObject(args, character);
}
/**