mirror of
https://github.com/halpz/re3.git
synced 2025-07-03 07:10:43 +00:00
Merge remote-tracking branch 'upstream/master' into script_dev
This commit is contained in:
@ -660,7 +660,7 @@ CPickups::DoPickUpEffects(CEntity *entity)
|
||||
|
||||
if (!entity->m_flagD80) {
|
||||
float s = Sin((float)((CTimer::GetTimeInMilliseconds() + (uintptr)entity) & 0x7FF) * DEGTORAD(360.0f / 0x800));
|
||||
float modifiedSin = 0.3 * (s + 1.0f);
|
||||
float modifiedSin = 0.3f * (s + 1.0f);
|
||||
|
||||
|
||||
int16 colorId;
|
||||
|
@ -4677,7 +4677,7 @@ int8 CRunningScript::ProcessCommandsFrom500To599(int32 command)
|
||||
CollectParameters(&m_nIp, 2);
|
||||
CPlayerPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed;
|
||||
assert(pPed);
|
||||
pPed->m_fHealth = *(float*)&ScriptParams[1];
|
||||
pPed->m_fHealth = ScriptParams[1];
|
||||
return 0;
|
||||
}
|
||||
case COMMAND_SET_CHAR_HEALTH:
|
||||
@ -4685,9 +4685,8 @@ int8 CRunningScript::ProcessCommandsFrom500To599(int32 command)
|
||||
CollectParameters(&m_nIp, 2);
|
||||
CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]);
|
||||
assert(pPed);
|
||||
float health = *(float*)&ScriptParams[1];
|
||||
if (health != 0.0f) {
|
||||
pPed->m_fHealth = *(float*)&ScriptParams[1];
|
||||
if (ScriptParams[1]) {
|
||||
pPed->m_fHealth = ScriptParams[1];
|
||||
}
|
||||
else if (pPed->bInVehicle) {
|
||||
pPed->SetDead();
|
||||
@ -4704,7 +4703,7 @@ int8 CRunningScript::ProcessCommandsFrom500To599(int32 command)
|
||||
CollectParameters(&m_nIp, 2);
|
||||
CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]);
|
||||
assert(pVehicle);
|
||||
pVehicle->m_fHealth = *(float*)&ScriptParams[1];
|
||||
pVehicle->m_fHealth = ScriptParams[1];
|
||||
return 0;
|
||||
}
|
||||
case COMMAND_GET_PLAYER_HEALTH:
|
||||
@ -4840,7 +4839,7 @@ int8 CRunningScript::ProcessCommandsFrom500To599(int32 command)
|
||||
CPed* pSourcePed = CPools::GetPedPool()->GetAt(ScriptParams[0]);
|
||||
assert(pSourcePed);
|
||||
pSourcePed->ClearLookFlag();
|
||||
pSourcePed->bIsRestoringLook = false;
|
||||
pSourcePed->bKeepTryingToLook = false;
|
||||
if (pSourcePed->GetPedState() == PED_LOOK_HEADING || pSourcePed->GetPedState() == PED_LOOK_ENTITY)
|
||||
pSourcePed->RestorePreviousState();
|
||||
return 0;
|
||||
@ -4851,7 +4850,7 @@ int8 CRunningScript::ProcessCommandsFrom500To599(int32 command)
|
||||
CPed* pSourcePed = CWorld::Players[ScriptParams[0]].m_pPed;
|
||||
assert(pSourcePed);
|
||||
pSourcePed->ClearLookFlag();
|
||||
pSourcePed->bIsRestoringLook = false;
|
||||
pSourcePed->bKeepTryingToLook = false;
|
||||
if (pSourcePed->GetPedState() == PED_LOOK_HEADING || pSourcePed->GetPedState() == PED_LOOK_ENTITY)
|
||||
pSourcePed->RestorePreviousState();
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user