fixed cops

This commit is contained in:
Nikolay Korolev 2019-07-14 15:00:36 +03:00
parent b77a9ce955
commit e16562aa6d
5 changed files with 8 additions and 2 deletions

View File

@ -1561,13 +1561,13 @@ int8 CRunningScript::ProcessCommandsFrom100To199(int32 command)
}
case COMMAND_ABS_VAR_FLOAT:
{
int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL);
float* ptr = (float*)GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL);
*ptr = abs(*ptr);
return 0;
}
case COMMAND_ABS_LVAR_FLOAT:
{
int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL);
float* ptr = (float*)GetPointerToScriptVariable(&m_nIp, VAR_LOCAL);
*ptr = abs(*ptr);
return 0;
}

View File

@ -3,6 +3,8 @@
#include "CopPed.h"
#include "ModelIndices.h"
WRAPPER void CCopPed::ProcessControl() { EAXJMP(0x4C1400); }
CCopPed::CCopPed(eCopType copType) : CPed(PEDTYPE_COP)
{
m_nCopType = copType;

View File

@ -35,6 +35,7 @@ public:
~CCopPed();
void ClearPursuit(void);
void ProcessControl(void);
};
static_assert(sizeof(CCopPed) == 0x558, "CCopPed: error");

View File

@ -10,6 +10,8 @@ public:
void dtor(void) { CEmergencyPed::~CEmergencyPed(); }
};
WRAPPER void CEmergencyPed::ProcessControl(void) { EAXJMP(0x4C2F10); }
CEmergencyPed::CEmergencyPed(uint32 type) : CPed(type)
{
switch (type){

View File

@ -15,5 +15,6 @@ public:
int32 field_1360;
CEmergencyPed(uint32);
void ProcessControl(void);
};
static_assert(sizeof(CEmergencyPed) == 0x554, "CEmergencyPed: error");