1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-25 20:02:40 +01:00

Implemented some locate opcodes

This commit is contained in:
Lucas Eriksson 2018-05-03 21:03:33 +02:00
parent 464a1e39b9
commit 263f861a7c

View File

@ -2449,53 +2449,44 @@ void opcode_00e2(const ScriptArguments& args, const ScriptPad padID, const Scrip
@brief player %1d% %6bin-sphere/%near_point %2d% %3d% radius %4d% %5d%
opcode 00e3
@arg player
@arg arg2
@arg arg3
@arg arg4
@arg arg5
@arg arg6
@arg player Player
@arg center Center of object
@arg radius Radius of object
@arg showMarker Show marker (True/False)
*/
bool opcode_00e3(const ScriptArguments& args, const ScriptPlayer player, const ScriptFloat arg2, const ScriptFloat arg3, const ScriptFloat arg4, const ScriptFloat arg5, const ScriptInt arg6) {
RW_UNIMPLEMENTED_OPCODE(0x00e3);
RW_UNUSED(player);
RW_UNUSED(arg2);
RW_UNUSED(arg3);
RW_UNUSED(arg4);
RW_UNUSED(arg5);
RW_UNUSED(arg6);
RW_UNUSED(args);
return false;
bool opcode_00e3(const ScriptArguments& args, const ScriptPlayer player, const ScriptVec2 center, const ScriptVec2 radius, const ScriptBoolean showMarker) {
auto plyChar = player->getCharacter();
return script::objectInRadius(args, plyChar, center, radius, showMarker);
}
/**
@brief player %1d% %6b:in-sphere/%near_point_on_foot %2d% %3d% radius %4d% %5d%
opcode 00e4
@arg player
@arg coord0
@arg coord1
@arg arg6
@arg player Player
@arg center Center of object
@arg radius Radius of object
@arg showMarker Show marker (True/False)
*/
bool opcode_00e4(const ScriptArguments& args, const ScriptPlayer player, const ScriptVec2 coord0, const ScriptVec2 coord1, const ScriptInt arg6) {
bool opcode_00e4(const ScriptArguments& args, const ScriptPlayer player, const ScriptVec2 center, const ScriptVec2 radius, const ScriptBoolean showMarker) {
auto plyChar = player->getCharacter();
auto condition = plyChar->getCurrentVehicle() == nullptr;
return script::objectInRadius(args, plyChar, coord0, coord1, arg6, condition);
return script::objectInRadius(args, plyChar, center, radius, showMarker, condition);
}
/**
@brief player %1d% %6bin-sphere/%near_point_in_car %2d% %3d% radius %4d% %5d%
opcode 00e5
@arg player
@arg center
@arg radius
@arg arg6
@arg player Player
@arg center Center of object
@arg radius Radius of object
@arg showMarker Show marker (True/False)
*/
bool opcode_00e5(const ScriptArguments& args, const ScriptPlayer player, ScriptVec2 center, ScriptVec2 radius, const ScriptInt arg6) {
bool opcode_00e5(const ScriptArguments& args, const ScriptPlayer player, ScriptVec2 center, ScriptVec2 radius, const ScriptBoolean showMarker) {
auto plyChar = player->getCharacter();
auto condition = plyChar->getCurrentVehicle() != nullptr;
return script::objectInRadius(args, plyChar, center, radius, arg6, condition);
return script::objectInRadius(args, plyChar, center, radius, showMarker, condition);
}
/**
@ -2503,102 +2494,91 @@ bool opcode_00e5(const ScriptArguments& args, const ScriptPlayer player, ScriptV
opcode 00e6
@arg player Player
@arg coord Coordinates
@arg radius Radius
@arg arg6 Boolean true/false
@arg center Center of object
@arg radius Radius of object
@arg showMarker Show marker (True/False)
*/
bool opcode_00e6(const ScriptArguments& args, const ScriptPlayer player, ScriptVec2 coord, ScriptVec2 radius, const ScriptBoolean arg6) {
bool opcode_00e6(const ScriptArguments& args, const ScriptPlayer player, ScriptVec2 center, ScriptVec2 radius, const ScriptBoolean showMarker) {
auto plyChar = player->getCharacter();
auto condition = plyChar->isStopped();
return script::objectInRadius(args, plyChar, coord, radius, arg6, condition);
return script::objectInRadius(args, plyChar, center, radius, showMarker, condition);
}
/**
@brief player %1d% stopped %6b:in-sphere/%near_point_on_foot %2d% %3d% radius %4d% %5d%
opcode 00e7
@arg player
@arg arg2
@arg arg3
@arg arg4
@arg arg5
@arg arg6
@arg player Player
@arg center Center of object
@arg radius Radius of object
@arg showMarker Show marker (True/False)
*/
bool opcode_00e7(const ScriptArguments& args, const ScriptPlayer player, const ScriptFloat arg2, const ScriptFloat arg3, const ScriptFloat arg4, const ScriptFloat arg5, const ScriptInt arg6) {
RW_UNIMPLEMENTED_OPCODE(0x00e7);
RW_UNUSED(player);
RW_UNUSED(arg2);
RW_UNUSED(arg3);
RW_UNUSED(arg4);
RW_UNUSED(arg5);
RW_UNUSED(arg6);
RW_UNUSED(args);
return false;
bool opcode_00e7(const ScriptArguments& args, const ScriptPlayer player, ScriptVec2 center, ScriptVec2 radius, const ScriptBoolean showMarker) {
auto plyChar = player->getCharacter();
auto condition = plyChar->isStopped() && plyChar->getCurrentVehicle() == nullptr;
return script::objectInRadius(args, plyChar, center, radius, showMarker, condition);
}
/**
@brief player %1d% stopped %6b:in-sphere/%near_point_in_car %2d% %3d% radius %4d% %5d%
opcode 00e8
@arg player
@arg coord
@arg radius
@arg arg6
@arg player Player
@arg center Center of object
@arg radius Radius of object
@arg showMarker Show marker (True/False)
*/
bool opcode_00e8(const ScriptArguments& args, const ScriptPlayer player, ScriptVec2 coord, ScriptVec2 radius, const ScriptInt arg6) {
bool opcode_00e8(const ScriptArguments& args, const ScriptPlayer player, ScriptVec2 center, ScriptVec2 radius, const ScriptBoolean showMarker) {
auto plyChar = player->getCharacter();
auto condition = plyChar->isStopped() && plyChar->getCurrentVehicle() != nullptr;
return script::objectInRadius(args, plyChar, coord, radius, arg6, condition);
return script::objectInRadius(args, plyChar, center, radius, showMarker, condition);
}
/**
@brief player %1d% %5b:in-sphere/%near_actor %2d% radius %3d% %4d%
opcode 00e9
@arg player
@arg character
@arg radius
@arg arg5
@arg player Player
@arg character Character goal
@arg radius Radius of goal
@arg showMarker Show marker (True/False)
*/
bool opcode_00e9(const ScriptArguments& args, const ScriptPlayer player, const ScriptCharacter character, ScriptVec2 radius, const ScriptInt arg5) {
bool opcode_00e9(const ScriptArguments& args, const ScriptPlayer player, const ScriptCharacter character, ScriptVec2 radius, const ScriptBoolean showMarker) {
auto plyChar = player->getCharacter();
return script::objectInRadiusNear(args, plyChar, character, radius, arg5);
/// @todo if character is in vehicle, game uses vehicle position instead of character one
return script::objectInRadiusNear(args, plyChar, character, radius, showMarker);
}
/**
@brief player %1d% %5b:in-sphere/%near_actor_on_foot %2d% radius %3d% %4d%
opcode 00ea
@arg player
@arg character
@arg arg3
@arg arg4
@arg arg5
@arg player Player
@arg character Character goal
@arg radius Radius of goal
@arg showMarker Show marker (True/False)
*/
bool opcode_00ea(const ScriptArguments& args, const ScriptPlayer player, const ScriptCharacter character, const ScriptFloat arg3, const ScriptFloat arg4, const ScriptInt arg5) {
RW_UNIMPLEMENTED_OPCODE(0x00ea);
RW_UNUSED(player);
RW_UNUSED(character);
RW_UNUSED(arg3);
RW_UNUSED(arg4);
RW_UNUSED(arg5);
RW_UNUSED(args);
return false;
bool opcode_00ea(const ScriptArguments& args, const ScriptPlayer player, const ScriptCharacter character, ScriptVec2 radius, const ScriptBoolean showMarker) {
auto plyChar = player->getCharacter();
auto condition = plyChar->getCurrentVehicle() == nullptr;
/// @todo if character is in vehicle, game uses vehicle position instead of character one
return script::objectInRadiusNear(args, plyChar, character, radius, showMarker, condition);
}
/**
@brief player %1d% %5b:in-sphere/%near_actor_in_car %2d% radius %3d% %4d%
opcode 00eb
@arg player
@arg character
@arg radius
@arg arg5
@arg player Player
@arg character Character goal
@arg radius Radius of goal
@arg showMarker Show marker (True/False)
*/
bool opcode_00eb(const ScriptArguments& args, const ScriptPlayer player, const ScriptCharacter character, ScriptVec2 radius, const ScriptInt arg5) {
bool opcode_00eb(const ScriptArguments& args, const ScriptPlayer player, const ScriptCharacter character, ScriptVec2 radius, const ScriptBoolean showMarker) {
auto plyChar = player->getCharacter();
auto condition = plyChar->getCurrentVehicle() != nullptr;
return script::objectInRadiusNear(args, plyChar, character, radius, arg5, condition);
/// @todo if character is in vehicle, game uses vehicle position instead of character one
return script::objectInRadiusNear(args, plyChar, character, radius, showMarker, condition);
}
/**
@ -2606,18 +2586,12 @@ bool opcode_00eb(const ScriptArguments& args, const ScriptPlayer player, const S
opcode 00ec
@arg character Character/ped
@arg coord Coordinates
@arg radius Radius
@arg arg6 Boolean true/false
@arg center Center of goal
@arg radius Radius of goal
@arg showMarker Show marker (True/False)
*/
bool opcode_00ec(const ScriptArguments& args, const ScriptCharacter character, ScriptVec2 coord, ScriptVec2 radius, const ScriptBoolean arg6) {
RW_UNIMPLEMENTED_OPCODE(0x00ec);
RW_UNUSED(character);
RW_UNUSED(coord);
RW_UNUSED(radius);
RW_UNUSED(arg6);
RW_UNUSED(args);
return false;
bool opcode_00ec(const ScriptArguments& args, const ScriptCharacter character, ScriptVec2 center, ScriptVec2 radius, const ScriptBoolean showMarker) {
return script::objectInRadius(args, character.get(), center, radius, showMarker);
}
/**
@ -2625,13 +2599,13 @@ bool opcode_00ec(const ScriptArguments& args, const ScriptCharacter character, S
opcode 00ed
@arg character Character/ped
@arg coord Coordinates
@arg radius
@arg arg6
@arg center Center of goal
@arg radius Radius of goal
@arg showMarker Show marker (True/False)
*/
bool opcode_00ed(const ScriptArguments& args, const ScriptCharacter character, ScriptVec2 coord, ScriptVec2 radius, const ScriptInt arg6) {
bool opcode_00ed(const ScriptArguments& args, const ScriptCharacter character, ScriptVec2 center, ScriptVec2 radius, const ScriptBoolean showMarker) {
auto condition = character->getCurrentVehicle() == nullptr;
return script::objectInRadius(args, character.get(), coord, radius, arg6, condition);
return script::objectInRadius(args, character.get(), center, radius, showMarker, condition);
}
/**
@ -2639,18 +2613,13 @@ bool opcode_00ed(const ScriptArguments& args, const ScriptCharacter character, S
opcode 00ee
@arg character Character/ped
@arg coord Coordinates
@arg radius Radius
@arg arg6 Boolean true/false
@arg center Center of goal
@arg radius Radius of goal
@arg showMarker Show marker (True/False)
*/
bool opcode_00ee(const ScriptArguments& args, const ScriptCharacter character, ScriptVec2 coord, ScriptVec2 radius, const ScriptBoolean arg6) {
RW_UNIMPLEMENTED_OPCODE(0x00ee);
RW_UNUSED(character);
RW_UNUSED(coord);
RW_UNUSED(radius);
RW_UNUSED(arg6);
RW_UNUSED(args);
return false;
bool opcode_00ee(const ScriptArguments& args, const ScriptCharacter character, ScriptVec2 center, ScriptVec2 radius, const ScriptBoolean showMarker) {
auto condition = character->getCurrentVehicle() != nullptr;
return script::objectInRadius(args, character.get(), center, radius, showMarker, condition);
}
/**
@ -2658,12 +2627,13 @@ bool opcode_00ee(const ScriptArguments& args, const ScriptCharacter character, S
opcode 00ef
@arg character Character/ped
@arg coord Coordinates
@arg radius Radius
@arg arg6 Boolean true/false
@arg center Center of goal
@arg radius Radius of goal
@arg showMarker Show marker (True/False)
*/
bool opcode_00ef(const ScriptArguments& args, const ScriptCharacter character, ScriptVec2 coord, ScriptVec2 radius, const ScriptBoolean arg6) {
return script::objectInRadius(args, character.get(), coord, radius, arg6);
bool opcode_00ef(const ScriptArguments& args, const ScriptCharacter character, ScriptVec2 center, ScriptVec2 radius, const ScriptBoolean showMarker) {
auto condition = character->isStopped();
return script::objectInRadius(args, character.get(), center, radius, showMarker, condition);
}
/**
@ -2671,18 +2641,13 @@ bool opcode_00ef(const ScriptArguments& args, const ScriptCharacter character, S
opcode 00f0
@arg character Character/ped
@arg coord Coordinates
@arg radius Radius
@arg arg6 Boolean true/false
@arg center Center of goal
@arg radius Radius of goal
@arg showMarker Show marker (True/False)
*/
bool opcode_00f0(const ScriptArguments& args, const ScriptCharacter character, ScriptVec2 coord, ScriptVec2 radius, const ScriptBoolean arg6) {
RW_UNIMPLEMENTED_OPCODE(0x00f0);
RW_UNUSED(character);
RW_UNUSED(coord);
RW_UNUSED(radius);
RW_UNUSED(arg6);
RW_UNUSED(args);
return false;
bool opcode_00f0(const ScriptArguments& args, const ScriptCharacter character, ScriptVec2 center, ScriptVec2 radius, const ScriptBoolean showMarker) {
auto condition = character->isStopped() && character->getCurrentVehicle() == nullptr;
return script::objectInRadius(args, character.get(), center, radius, showMarker, condition);
}
/**
@ -2690,18 +2655,13 @@ bool opcode_00f0(const ScriptArguments& args, const ScriptCharacter character, S
opcode 00f1
@arg character Character/ped
@arg coord Coordinates
@arg radius Radius
@arg arg6 Boolean true/false
@arg center Center of goal
@arg radius Radius of goal
@arg showMarker Show marker (True/False)
*/
bool opcode_00f1(const ScriptArguments& args, const ScriptCharacter character, ScriptVec2 coord, ScriptVec2 radius, const ScriptBoolean arg6) {
RW_UNIMPLEMENTED_OPCODE(0x00f1);
RW_UNUSED(character);
RW_UNUSED(coord);
RW_UNUSED(radius);
RW_UNUSED(arg6);
RW_UNUSED(args);
return false;
bool opcode_00f1(const ScriptArguments& args, const ScriptCharacter character, ScriptVec2 center, ScriptVec2 radius, const ScriptBoolean showMarker) {
auto condition = character->isStopped() && character->getCurrentVehicle() != nullptr;
return script::objectInRadius(args, character.get(), center, radius, showMarker, condition);
}
/**
@ -2710,17 +2670,12 @@ bool opcode_00f1(const ScriptArguments& args, const ScriptCharacter character, S
opcode 00f2
@arg character0 Character/ped
@arg character1 Character/ped
@arg radius Radius
@arg arg5 Boolean true/false
@arg radius Radius of goal
@arg showMarker Show marker (True/False)
*/
bool opcode_00f2(const ScriptArguments& args, const ScriptCharacter character0, const ScriptCharacter character1, ScriptVec2 radius, const ScriptBoolean arg5) {
RW_UNIMPLEMENTED_OPCODE(0x00f2);
RW_UNUSED(character0);
RW_UNUSED(character1);
RW_UNUSED(radius);
RW_UNUSED(arg5);
RW_UNUSED(args);
return false;
bool opcode_00f2(const ScriptArguments& args, const ScriptCharacter character0, const ScriptCharacter character1, ScriptVec2 radius, const ScriptBoolean showMarker) {
/// @todo if characters are in vehicles, game uses vehicle positions instead of character ones
return script::objectInRadiusNear(args, character0, character1, radius, showMarker);
}
/**
@ -2729,17 +2684,13 @@ bool opcode_00f2(const ScriptArguments& args, const ScriptCharacter character0,
opcode 00f3
@arg character0 Character/ped
@arg character1 Character/ped
@arg radius Radius
@arg arg5 Boolean true/false
@arg radius Radius of goal
@arg showMarker Show marker (True/False)
*/
bool opcode_00f3(const ScriptArguments& args, const ScriptCharacter character0, const ScriptCharacter character1, ScriptVec2 radius, const ScriptBoolean arg5) {
RW_UNIMPLEMENTED_OPCODE(0x00f3);
RW_UNUSED(character0);
RW_UNUSED(character1);
RW_UNUSED(radius);
RW_UNUSED(arg5);
RW_UNUSED(args);
return false;
bool opcode_00f3(const ScriptArguments& args, const ScriptCharacter character0, const ScriptCharacter character1, ScriptVec2 radius, const ScriptBoolean showMarker) {
auto condition = character0->getCurrentVehicle() == nullptr;
/// @todo if characters are in vehicles, game uses vehicle positions instead of character ones
return script::objectInRadiusNear(args, character0, character1, radius, showMarker, condition);
}
/**
@ -2748,234 +2699,178 @@ bool opcode_00f3(const ScriptArguments& args, const ScriptCharacter character0,
opcode 00f4
@arg character0 Character/ped
@arg character1 Character/ped
@arg radius Radius
@arg arg5 Boolean true/false
@arg radius Radius of goal
@arg showMarker Show marker (True/False)
*/
bool opcode_00f4(const ScriptArguments& args, const ScriptCharacter character0, const ScriptCharacter character1, ScriptVec2 radius, const ScriptBoolean arg5) {
RW_UNIMPLEMENTED_OPCODE(0x00f4);
RW_UNUSED(character0);
RW_UNUSED(character1);
RW_UNUSED(radius);
RW_UNUSED(arg5);
RW_UNUSED(args);
return false;
bool opcode_00f4(const ScriptArguments& args, const ScriptCharacter character0, const ScriptCharacter character1, ScriptVec2 radius, const ScriptBoolean showMarker) {
auto condition = character0->getCurrentVehicle() != nullptr;
/// @todo if characters are in vehicles, game uses vehicle positions instead of character ones
return script::objectInRadiusNear(args, character0, character1, radius, showMarker, condition);
}
/**
@brief player %1d% %8b:in-sphere/%near_point %2d% %3d% %4d% radius %5d% %6d% %7d%
opcode 00f5
@arg player
@arg arg2
@arg arg3
@arg arg4
@arg arg5
@arg arg6
@arg arg7
@arg arg8
@arg player Player
@arg center Center of object
@arg radius Radius of object
@arg showMarker Show marker (True/False)
*/
bool opcode_00f5(const ScriptArguments& args, const ScriptPlayer player, const ScriptFloat arg2, const ScriptFloat arg3, const ScriptFloat arg4, const ScriptFloat arg5, const ScriptFloat arg6, const ScriptFloat arg7, const ScriptInt arg8) {
RW_UNIMPLEMENTED_OPCODE(0x00f5);
RW_UNUSED(player);
RW_UNUSED(arg2);
RW_UNUSED(arg3);
RW_UNUSED(arg4);
RW_UNUSED(arg5);
RW_UNUSED(arg6);
RW_UNUSED(arg7);
RW_UNUSED(arg8);
RW_UNUSED(args);
return false;
bool opcode_00f5(const ScriptArguments& args, const ScriptPlayer player, ScriptVec3 center, ScriptVec3 radius, const ScriptBoolean showMarker) {
auto plyChar = player->getCharacter();
return script::objectInRadius(args, plyChar, center, radius, showMarker);
}
/**
@brief player %1d% %8b:in-sphere/%near_point_on_foot %2d% %3d% %4d% radius %5d% %6d% %7d%
opcode 00f6
@arg player
@arg coord
@arg radius
@arg arg8
@arg player Player
@arg center Center of object
@arg radius Radius of object
@arg showMarker Show marker (True/False)
*/
bool opcode_00f6(const ScriptArguments& args, const ScriptPlayer player, ScriptVec3 coord, ScriptVec3 radius, const ScriptInt arg8) {
bool opcode_00f6(const ScriptArguments& args, const ScriptPlayer player, ScriptVec3 center, ScriptVec3 radius, const ScriptBoolean showMarker) {
auto plyChar = player->getCharacter();
auto condition = plyChar->getCurrentVehicle() == nullptr;
return script::objectInRadius(args, plyChar, coord, radius, arg8, condition);
return script::objectInRadius(args, plyChar, center, radius, showMarker, condition);
}
/**
@brief player %1d% sphere %8b% near_point_in_car %2d% %3d% %4d% radius %5d% %6d% %7d%
opcode 00f7
@arg player
@arg coord
@arg radius
@arg arg8
@arg player Player
@arg center Center of object
@arg radius Radius of object
@arg showMarker Show marker (True/False)
*/
bool opcode_00f7(const ScriptArguments& args, const ScriptPlayer player, ScriptVec3 coord, ScriptVec3 radius, const ScriptInt arg8) {
bool opcode_00f7(const ScriptArguments& args, const ScriptPlayer player, ScriptVec3 center, ScriptVec3 radius, const ScriptBoolean showMarker) {
auto plyChar = player->getCharacter();
auto condition = plyChar->getCurrentVehicle() != nullptr;
return script::objectInRadius(args, plyChar, coord, radius, arg8, condition);
return script::objectInRadius(args, plyChar, center, radius, showMarker, condition);
}
/**
@brief player %1d% stopped %8b:in-sphere/%near_point %2d% %3d% %4d% radius %5d% %6d% %7d%
opcode 00f8
@arg player
@arg coord
@arg radius
@arg arg8
@arg player Player
@arg center Center of object
@arg radius Radius of object
@arg showMarker Show marker (True/False)
*/
bool opcode_00f8(const ScriptArguments& args, const ScriptPlayer player, ScriptVec3 coord, ScriptVec3 radius, const ScriptInt arg8) {
bool opcode_00f8(const ScriptArguments& args, const ScriptPlayer player, ScriptVec3 center, ScriptVec3 radius, const ScriptBoolean showMarker) {
auto plyChar = player->getCharacter();
auto condition = plyChar->isStopped();
return script::objectInRadius(args, plyChar, coord, radius, arg8, condition);
return script::objectInRadius(args, plyChar, center, radius, showMarker, condition);
}
/**
@brief player %1d% stopped %8b:in-sphere/%near_point_on_foot %2d% %3d% %4d% radius %5d% %6d% %7d%
opcode 00f9
@arg player
@arg arg2
@arg arg3
@arg arg4
@arg arg5
@arg arg6
@arg arg7
@arg arg8
@arg player Player
@arg center Center of object
@arg radius Radius of object
@arg showMarker Show marker (True/False)
*/
bool opcode_00f9(const ScriptArguments& args, const ScriptPlayer player, ScriptVec3 coord, ScriptVec3 radius, const ScriptInt arg8) {
bool opcode_00f9(const ScriptArguments& args, const ScriptPlayer player, ScriptVec3 center, ScriptVec3 radius, const ScriptBoolean showMarker) {
auto plyChar = player->getCharacter();
auto condition = plyChar->isStopped() && plyChar->getCurrentVehicle() == nullptr;
return script::objectInRadius(args, plyChar, coord, radius, arg8, condition);
return script::objectInRadius(args, plyChar, center, radius, showMarker, condition);
}
/**
@brief player %1d% stopped %8b:in-sphere/%near_point_in_car %2d% %3d% %4d% radius %5d% %6d% %7d%
opcode 00fa
@arg player
@arg arg2
@arg arg3
@arg arg4
@arg arg5
@arg arg6
@arg arg7
@arg arg8
@arg player Player
@arg center Center of object
@arg radius Radius of object
@arg showMarker Show marker (True/False)
*/
bool opcode_00fa(const ScriptArguments& args, const ScriptPlayer player, const ScriptFloat arg2, const ScriptFloat arg3, const ScriptFloat arg4, const ScriptFloat arg5, const ScriptFloat arg6, const ScriptFloat arg7, const ScriptInt arg8) {
RW_UNIMPLEMENTED_OPCODE(0x00fa);
RW_UNUSED(player);
RW_UNUSED(arg2);
RW_UNUSED(arg3);
RW_UNUSED(arg4);
RW_UNUSED(arg5);
RW_UNUSED(arg6);
RW_UNUSED(arg7);
RW_UNUSED(arg8);
RW_UNUSED(args);
return false;
bool opcode_00fa(const ScriptArguments& args, const ScriptPlayer player, ScriptVec3 center, ScriptVec3 radius, const ScriptBoolean showMarker) {
auto plyChar = player->getCharacter();
auto condition = plyChar->isStopped() && plyChar->getCurrentVehicle() != nullptr;
return script::objectInRadius(args, plyChar, center, radius, showMarker, condition);
}
/**
@brief player %1d% %6b:in-sphere/%near_actor %2d% radius %3d% %4d% %5d%
opcode 00fb
@arg player
@arg character
@arg arg3
@arg arg4
@arg arg5
@arg arg6
@arg player Player
@arg character Character goal
@arg radius Radius of goal
@arg showMarker Show marker (True/False)
*/
bool opcode_00fb(const ScriptArguments& args, const ScriptPlayer player, const ScriptCharacter character, const ScriptFloat arg3, const ScriptFloat arg4, const ScriptFloat arg5, const ScriptInt arg6) {
RW_UNIMPLEMENTED_OPCODE(0x00fb);
RW_UNUSED(player);
RW_UNUSED(character);
RW_UNUSED(arg3);
RW_UNUSED(arg4);
RW_UNUSED(arg5);
RW_UNUSED(arg6);
RW_UNUSED(args);
return false;
bool opcode_00fb(const ScriptArguments& args, const ScriptPlayer player, const ScriptCharacter character, ScriptVec3 radius, const ScriptBoolean showMarker) {
auto plyChar = player->getCharacter();
/// @todo if character is in vehicle, game uses vehicle position instead of character one
return script::objectInRadiusNear(args, plyChar, character, radius, showMarker);
}
/**
@brief player %1d% %6b:in-sphere/%near_actor %2d% on_foot radius %3d% %4d% %5d%
opcode 00fc
@arg player
@arg character
@arg arg3
@arg arg4
@arg arg5
@arg arg6
@arg player Player
@arg character Character goal
@arg radius Radius of goal
@arg showMarker Show marker (True/False)
*/
bool opcode_00fc(const ScriptArguments& args, const ScriptPlayer player, const ScriptCharacter character, const ScriptFloat arg3, const ScriptFloat arg4, const ScriptFloat arg5, const ScriptInt arg6) {
RW_UNIMPLEMENTED_OPCODE(0x00fc);
RW_UNUSED(player);
RW_UNUSED(character);
RW_UNUSED(arg3);
RW_UNUSED(arg4);
RW_UNUSED(arg5);
RW_UNUSED(arg6);
RW_UNUSED(args);
return false;
bool opcode_00fc(const ScriptArguments& args, const ScriptPlayer player, const ScriptCharacter character, ScriptVec3 radius, const ScriptBoolean showMarker) {
auto plyChar = player->getCharacter();
auto condition = plyChar->getCurrentVehicle() == nullptr;
/// @todo if character is in vehicle, game uses vehicle position instead of character one
return script::objectInRadiusNear(args, plyChar, character, radius, showMarker, condition);
}
/**
@brief player %1d% %6b:in-sphere/%near_actor %2d% in_car radius %3d% %4d% %5d%
opcode 00fd
@arg player
@arg character
@arg radius
@arg arg6
@arg player Player
@arg character Character goal
@arg radius Radius of goal
@arg showMarker Show marker (True/False)
*/
bool opcode_00fd(const ScriptArguments& args, const ScriptPlayer player, const ScriptCharacter character, ScriptVec3 radius, const ScriptInt arg6) {
bool opcode_00fd(const ScriptArguments& args, const ScriptPlayer player, const ScriptCharacter character, ScriptVec3 radius, const ScriptBoolean showMarker) {
auto plyChar = player->getCharacter();
auto condition = plyChar->getCurrentVehicle() != nullptr;
return script::objectInRadiusNear(args, plyChar, character, radius, arg6, condition);
/// @todo if character is in vehicle, game uses vehicle position instead of character one
return script::objectInRadiusNear(args, plyChar, character, radius, showMarker, condition);
}
/**
@brief actor %1d% %8bin-sphere/%near_point %2d% %3d% %4d% radius %5d% %6d% %7d%
opcode 00fe
@arg character Character/ped
@arg coord Coordinates
@arg radius Radius
@arg arg8 Boolean true/false
@arg player Player
@arg center Center of object
@arg radius Radius of object
@arg showMarker Show marker (True/False)
*/
bool opcode_00fe(const ScriptArguments& args, const ScriptCharacter character, ScriptVec3 coord, ScriptVec3 radius, const ScriptBoolean arg8) {
RW_UNIMPLEMENTED_OPCODE(0x00fe);
RW_UNUSED(character);
RW_UNUSED(coord);
RW_UNUSED(radius);
RW_UNUSED(arg8);
RW_UNUSED(args);
return false;
bool opcode_00fe(const ScriptArguments& args, const ScriptCharacter character, ScriptVec3 center, ScriptVec3 radius, const ScriptBoolean showMarker) {
/// @todo if character is in vehicle, game uses vehicle position instead of character one
return script::objectInRadius(args, character.get(), center, radius, showMarker);
}
/**
@brief actor %1d% %8bin-sphere/%near_point_on_foot %2d% %3d% %4d% radius %5d% %6d% %7d%
opcode 00ff
@arg character Character/ped
@arg coord Coordinates
@arg radius Radius
@arg arg8 Boolean true/false
@arg player Player
@arg center Center of object
@arg radius Radius of object
@arg showMarker Show marker (True/False)
*/
bool opcode_00ff(const ScriptArguments& args, const ScriptCharacter character, ScriptVec3 coord, ScriptVec3 radius, const ScriptBoolean arg8) {
RW_UNIMPLEMENTED_OPCODE(0x00ff);
RW_UNUSED(character);
RW_UNUSED(coord);
RW_UNUSED(radius);
RW_UNUSED(arg8);
RW_UNUSED(args);
return false;
bool opcode_00ff(const ScriptArguments& args, const ScriptCharacter character, ScriptVec3 center, ScriptVec3 radius, const ScriptBoolean showMarker) {
auto condition = character->getCurrentVehicle() == nullptr;
/// @todo if character is in vehicle, game uses vehicle position instead of character one
return script::objectInRadius(args, character.get(), center, radius, showMarker, condition);
}
/**
@ -2983,13 +2878,14 @@ bool opcode_00ff(const ScriptArguments& args, const ScriptCharacter character, S
opcode 0100
@arg character Character/ped
@arg coord Coordinates
@arg radius Radius
@arg arg8 Boolean true/false
@arg center Center of object
@arg radius Radius of object
@arg showMarker Show marker (True/False)
*/
bool opcode_0100(const ScriptArguments& args, const ScriptCharacter character, ScriptVec3 coord, ScriptVec3 radius, const ScriptBoolean arg8) {
bool opcode_0100(const ScriptArguments& args, const ScriptCharacter character, ScriptVec3 center, ScriptVec3 radius, const ScriptBoolean showMarker) {
auto condition = character->getCurrentVehicle() != nullptr;
return script::objectInRadius(args, character.get(), coord, radius, arg8, condition);
/// @todo if character is in vehicle, game uses vehicle position instead of character one
return script::objectInRadius(args, character.get(), center, radius, showMarker, condition);
}
/**
@ -2997,18 +2893,14 @@ bool opcode_0100(const ScriptArguments& args, const ScriptCharacter character, S
opcode 0101
@arg character Character/ped
@arg coord Coordinates
@arg radius Radius
@arg arg8 Boolean true/false
@arg center Center of object
@arg radius Radius of object
@arg showMarker Show marker (True/False)
*/
bool opcode_0101(const ScriptArguments& args, const ScriptCharacter character, ScriptVec3 coord, ScriptVec3 radius, const ScriptBoolean arg8) {
RW_UNIMPLEMENTED_OPCODE(0x0101);
RW_UNUSED(character);
RW_UNUSED(coord);
RW_UNUSED(radius);
RW_UNUSED(arg8);
RW_UNUSED(args);
return false;
bool opcode_0101(const ScriptArguments& args, const ScriptCharacter character, ScriptVec3 center, ScriptVec3 radius, const ScriptBoolean showMarker) {
auto condition = character->isStopped();
/// @todo if character is in vehicle, game uses vehicle position instead of character one
return script::objectInRadius(args, character.get(), center, radius, showMarker, condition);
}
/**
@ -3016,18 +2908,14 @@ bool opcode_0101(const ScriptArguments& args, const ScriptCharacter character, S
opcode 0102
@arg character Character/ped
@arg coord Coordinates
@arg radius Radius
@arg arg8 Boolean true/false
@arg center Center of object
@arg radius Radius of object
@arg showMarker Show marker (True/False)
*/
bool opcode_0102(const ScriptArguments& args, const ScriptCharacter character, ScriptVec3 coord, ScriptVec3 radius, const ScriptBoolean arg8) {
RW_UNIMPLEMENTED_OPCODE(0x0102);
RW_UNUSED(character);
RW_UNUSED(coord);
RW_UNUSED(radius);
RW_UNUSED(arg8);
RW_UNUSED(args);
return false;
bool opcode_0102(const ScriptArguments& args, const ScriptCharacter character, ScriptVec3 center, ScriptVec3 radius, const ScriptBoolean showMarker) {
auto condition = character->isStopped() && character->getCurrentVehicle() == nullptr;
/// @todo if character is in vehicle, game uses vehicle position instead of character one
return script::objectInRadius(args, character.get(), center, radius, showMarker, condition);
}
/**
@ -3035,18 +2923,14 @@ bool opcode_0102(const ScriptArguments& args, const ScriptCharacter character, S
opcode 0103
@arg character Character/ped
@arg coord Coordinates
@arg radius Radius
@arg arg8 Boolean true/false
@arg center Center of object
@arg radius Radius of object
@arg showMarker Show marker (True/False)
*/
bool opcode_0103(const ScriptArguments& args, const ScriptCharacter character, ScriptVec3 coord, ScriptVec3 radius, const ScriptBoolean arg8) {
RW_UNIMPLEMENTED_OPCODE(0x0103);
RW_UNUSED(character);
RW_UNUSED(coord);
RW_UNUSED(radius);
RW_UNUSED(arg8);
RW_UNUSED(args);
return false;
bool opcode_0103(const ScriptArguments& args, const ScriptCharacter character, ScriptVec3 center, ScriptVec3 radius, const ScriptBoolean showMarker) {
auto condition = character->isStopped() && character->getCurrentVehicle() != nullptr;
/// @todo if character is in vehicle, game uses vehicle position instead of character one
return script::objectInRadius(args, character.get(), center, radius, showMarker, condition);
}
/**
@ -3055,17 +2939,12 @@ bool opcode_0103(const ScriptArguments& args, const ScriptCharacter character, S
opcode 0104
@arg character0 Character/ped
@arg character1 Character/ped
@arg radius Radius
@arg arg6 Boolean true/false
@arg radius Radius of goal
@arg showMarker Show marker (True/False)
*/
bool opcode_0104(const ScriptArguments& args, const ScriptCharacter character0, const ScriptCharacter character1, ScriptVec3 radius, const ScriptBoolean arg6) {
RW_UNIMPLEMENTED_OPCODE(0x0104);
RW_UNUSED(character0);
RW_UNUSED(character1);
RW_UNUSED(radius);
RW_UNUSED(arg6);
RW_UNUSED(args);
return false;
bool opcode_0104(const ScriptArguments& args, const ScriptCharacter character0, const ScriptCharacter character1, ScriptVec3 radius, const ScriptBoolean showMarker) {
/// @todo if characters are in vehicles, game uses vehicle positions instead of character ones
return script::objectInRadiusNear(args, character0, character1, radius, showMarker);
}
/**
@ -3074,17 +2953,13 @@ bool opcode_0104(const ScriptArguments& args, const ScriptCharacter character0,
opcode 0105
@arg character0 Character/ped
@arg character1 Character/ped
@arg radius Radius
@arg arg6 Boolean true/false
@arg radius Radius of goal
@arg showMarker Show marker (True/False)
*/
bool opcode_0105(const ScriptArguments& args, const ScriptCharacter character0, const ScriptCharacter character1, ScriptVec3 radius, const ScriptBoolean arg6) {
RW_UNIMPLEMENTED_OPCODE(0x0105);
RW_UNUSED(character0);
RW_UNUSED(character1);
RW_UNUSED(radius);
RW_UNUSED(arg6);
RW_UNUSED(args);
return false;
bool opcode_0105(const ScriptArguments& args, const ScriptCharacter character0, const ScriptCharacter character1, ScriptVec3 radius, const ScriptBoolean showMarker) {
auto condition = character0->getCurrentVehicle() == nullptr;
/// @todo if characters are in vehicles, game uses vehicle positions instead of character ones
return script::objectInRadiusNear(args, character0, character1, radius, showMarker, condition);
}
/**
@ -3093,17 +2968,13 @@ bool opcode_0105(const ScriptArguments& args, const ScriptCharacter character0,
opcode 0106
@arg character0 Character/ped
@arg character1 Character/ped
@arg radius Radius
@arg arg6 Boolean true/false
@arg radius Radius of goal
@arg showMarker Show marker (True/False)
*/
bool opcode_0106(const ScriptArguments& args, const ScriptCharacter character0, const ScriptCharacter character1, ScriptVec3 radius, const ScriptBoolean arg6) {
RW_UNIMPLEMENTED_OPCODE(0x0106);
RW_UNUSED(character0);
RW_UNUSED(character1);
RW_UNUSED(radius);
RW_UNUSED(arg6);
RW_UNUSED(args);
return false;
bool opcode_0106(const ScriptArguments& args, const ScriptCharacter character0, const ScriptCharacter character1, ScriptVec3 radius, const ScriptBoolean showMarker) {
auto condition = character0->getCurrentVehicle() != nullptr;
/// @todo if characters are in vehicles, game uses vehicle positions instead of character ones
return script::objectInRadiusNear(args, character0, character1, radius, showMarker, condition);
}
/**
@ -3679,11 +3550,7 @@ void opcode_0152(const ScriptArguments& args, const ScriptString arg1, const Scr
@arg areaName Area name
*/
bool opcode_0154(const ScriptArguments& args, const ScriptCharacter character, const ScriptString areaName) {
RW_UNIMPLEMENTED_OPCODE(0x0154);
RW_UNUSED(character);
RW_UNUSED(areaName);
RW_UNUSED(args);
return false;
return script::objectInZone(args, character.get(), areaName);
}
/**
@ -11418,16 +11285,18 @@ void opcode_03c5(const ScriptArguments& args, ScriptVec3 coord, const ScriptFloa
@brief current_island == %1d%
opcode 03c6
@arg arg1
@arg island
*/
bool opcode_03c6(const ScriptArguments& args, const ScriptLevel arg1) {
// The paramter to this is actually the island number.
bool opcode_03c6(const ScriptArguments& args, const ScriptLevel island) {
// The parameter to this is actually the island number.
// Not sure how that will fit into the scheme of full paging
/// @todo use the current player zone island number to return the correct value.
RW_UNIMPLEMENTED_OPCODE(0x03c6);
RW_UNUSED(arg1);
RW_UNUSED(args);
return true;
// this might be very slow
auto world = args.getWorld();
auto plyChar = world->pedestrianPool.find(world->state->playerObject);
auto zone = world->data->findZoneAt(plyChar->getPosition());
return island == zone->island;
}
/**