[saco] Implement/match CGame::FindGroundZForCoord(...)

This commit is contained in:
RD42 2024-07-28 22:55:34 +08:00
parent d92256c9ac
commit c71af77066
3 changed files with 12 additions and 0 deletions

View File

@ -128,6 +128,15 @@ BOOL CGame::IsKeyPressed(int iKeyIdentifier)
//-----------------------------------------------------------
float CGame::FindGroundZForCoord(float x, float y, float z)
{
float fGroundZ;
ScriptCommand(&get_ground_z, x, y, z, &fGroundZ);
return fGroundZ;
}
//-----------------------------------------------------------
void CGame::InitGame()
{
// Create a buffer for game text.

View File

@ -38,6 +38,7 @@ public:
int GetWeaponModelIDFromWeapon(int iWeaponID);
BOOL IsKeyPressed(int iKeyIdentifier);
float FindGroundZForCoord(float x, float y, float z);
void StartGame();
void InitGame();
BOOL IsGameLoaded();

View File

@ -50,6 +50,8 @@ const SCRIPT_COMMAND create_icon_marker_sphere = { 0x02A7, "fffiv" };
const SCRIPT_COMMAND add_to_player_money = { 0x0109, "ii" }; // PLAYER_CHAR, money
const SCRIPT_COMMAND get_ground_z = { 0x02ce, "fffv" }; // x, y, z, var_ground_z
const SCRIPT_COMMAND destroy_racing_checkpoint = { 0x06d6, "i" };
const SCRIPT_COMMAND set_actor_armed_weapon = { 0x01b9, "ii" };