mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-25 12:43:43 +00:00
script revision p2
This commit is contained in:
parent
c5c887cc11
commit
a1c241af37
8 changed files with 30 additions and 24 deletions
|
@ -709,8 +709,10 @@ bool
|
|||
CPickups::TestForPickupsInBubble(CVector pos, float range)
|
||||
{
|
||||
for (int i = 0; i < NUMPICKUPS; i++) {
|
||||
if ((aPickUps[i].m_vecPos - pos).Magnitude() < range)
|
||||
return true;
|
||||
if (aPickUps[i].m_eType != PICKUP_NONE) {
|
||||
if ((aPickUps[i].m_vecPos - pos).Magnitude() < range)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -442,7 +442,7 @@ void CMissionCleanup::Process()
|
|||
#endif
|
||||
CStreaming::ms_disableStreaming = false;
|
||||
if (CHud::m_ItemToFlash != ITEM_ARMOUR && CHud::m_ItemToFlash != ITEM_HEALTH)
|
||||
CHud::m_ItemToFlash = -1;
|
||||
CHud::m_ItemToFlash = ITEM_NONE;
|
||||
CHud::SetHelpMessage(nil, false); // nil, false, false, true TODO(LCS)
|
||||
CUserDisplay::OnscnTimer.m_bDisabled = false;
|
||||
CWorld::Players[0].m_pPed->m_pWanted->m_bIgnoredByCops = false;
|
||||
|
|
|
@ -104,7 +104,11 @@ int8 CRunningScript::ProcessCommands1600To1699(int32 command)
|
|||
return 0;
|
||||
}
|
||||
case COMMAND_IS_DEVELOPER:
|
||||
#ifdef GTA_NETWORK
|
||||
UpdateCompareFlag(gDeveloperFlag || gIsMultiplayerGame);
|
||||
#else
|
||||
UpdateCompareFlag(gDeveloperFlag);
|
||||
#endif
|
||||
return 0;
|
||||
case COMMAND_SET_DEVELOPER_FLAG:
|
||||
CollectParameters(&m_nIp, 1);
|
||||
|
|
|
@ -1785,6 +1785,7 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command)
|
|||
StoreParameters(&m_nIp, 1);
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
case COMMAND_IS_CHAR_IN_ANY_BOAT:
|
||||
{
|
||||
CollectParameters(&m_nIp, 1);
|
||||
|
@ -1793,6 +1794,7 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command)
|
|||
UpdateCompareFlag(pPed->bInVehicle && pPed->m_pMyVehicle->GetVehicleAppearance() == VEHICLE_APPEARANCE_BOAT);
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
case COMMAND_IS_PLAYER_IN_ANY_BOAT:
|
||||
{
|
||||
CollectParameters(&m_nIp, 1);
|
||||
|
@ -1801,6 +1803,7 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command)
|
|||
UpdateCompareFlag(pPed->bInVehicle && pPed->m_pMyVehicle->GetVehicleAppearance() == VEHICLE_APPEARANCE_BOAT);
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
case COMMAND_IS_CHAR_IN_ANY_HELI:
|
||||
{
|
||||
CollectParameters(&m_nIp, 1);
|
||||
|
@ -1809,6 +1812,7 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command)
|
|||
UpdateCompareFlag(pPed->bInVehicle && pPed->m_pMyVehicle->GetVehicleAppearance() == VEHICLE_APPEARANCE_HELI);
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
case COMMAND_IS_PLAYER_IN_ANY_HELI:
|
||||
{
|
||||
CollectParameters(&m_nIp, 1);
|
||||
|
@ -1817,6 +1821,7 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command)
|
|||
UpdateCompareFlag(pPed->bInVehicle && pPed->m_pMyVehicle->GetVehicleAppearance() == VEHICLE_APPEARANCE_HELI);
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
case COMMAND_IS_CHAR_IN_ANY_PLANE:
|
||||
{
|
||||
CollectParameters(&m_nIp, 1);
|
||||
|
@ -1825,6 +1830,7 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command)
|
|||
UpdateCompareFlag(pPed->bInVehicle && pPed->m_pMyVehicle->GetVehicleAppearance() == VEHICLE_APPEARANCE_PLANE);
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
case COMMAND_IS_PLAYER_IN_ANY_PLANE:
|
||||
{
|
||||
CollectParameters(&m_nIp, 1);
|
||||
|
|
|
@ -373,6 +373,7 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command)
|
|||
}
|
||||
case COMMAND_HAS_PHOTOGRAPH_BEEN_TAKEN:
|
||||
UpdateCompareFlag(CWeapon::bPhotographHasBeenTaken);
|
||||
CWeapon::bPhotographHasBeenTaken = false;
|
||||
return 0;
|
||||
case COMMAND_GET_CHAR_ARMOUR:
|
||||
{
|
||||
|
@ -508,7 +509,7 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command)
|
|||
CTheScripts::ReadTextLabelFromScript(&m_nIp, key);
|
||||
m_nIp += KEY_LENGTH_IN_SCRIPT;
|
||||
CStreaming::RemoveAnim(CAnimManager::GetAnimationBlockIndex(key));
|
||||
// + empty function on PS2
|
||||
// + empty function on PS2 (not PSP)
|
||||
return 0;
|
||||
}
|
||||
case COMMAND_IS_CHAR_WAITING_FOR_WORLD_COLLISION:
|
||||
|
@ -636,11 +637,8 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command)
|
|||
SET_INTEGER_PARAM(1, 0);
|
||||
else if (GET_INTEGER_PARAM(1) == 3)
|
||||
SET_INTEGER_PARAM(1, 1);
|
||||
pVehicle->BurstTyre(GET_INTEGER_PARAM(1), true);
|
||||
}
|
||||
else {
|
||||
pVehicle->BurstTyre(GET_INTEGER_PARAM(1), true);
|
||||
}
|
||||
pVehicle->BurstTyre(GET_INTEGER_PARAM(1), true);
|
||||
return 0;
|
||||
}
|
||||
case COMMAND_IS_CHAR_OBJ_NO_OBJ:
|
||||
|
@ -812,7 +810,7 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command)
|
|||
m_nIp += KEY_LENGTH_IN_SCRIPT;
|
||||
// TheText.Get(key);
|
||||
CPickups::GetActualPickupIndex(CollectNextParameterWithoutIncreasingPC(m_nIp));
|
||||
SET_INTEGER_PARAM(0, CPickups::GenerateNewOne(pos, MI_PICKUP_PROPERTY, PICKUP_PROPERTY_LOCKED, 0, 0, false, key)); // TODO: gpModelIndices
|
||||
SET_INTEGER_PARAM(0, CPickups::GenerateNewOne(pos, MI_PICKUP_PROPERTY, PICKUP_PROPERTY_LOCKED, 0, 0, false, key));
|
||||
StoreParameters(&m_nIp, 1);
|
||||
return 0;
|
||||
}
|
||||
|
@ -825,9 +823,9 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command)
|
|||
char key[KEY_LENGTH_IN_SCRIPT];
|
||||
CTheScripts::ReadTextLabelFromScript(&m_nIp, key);
|
||||
m_nIp += KEY_LENGTH_IN_SCRIPT;
|
||||
// TheText.Get(key);
|
||||
TheText.Get(key);
|
||||
CPickups::GetActualPickupIndex(CollectNextParameterWithoutIncreasingPC(m_nIp));
|
||||
SET_INTEGER_PARAM(0, CPickups::GenerateNewOne(pos, MI_PICKUP_PROPERTY_FORSALE, PICKUP_PROPERTY_FORSALE, GET_INTEGER_PARAM(3), 0, false, key)); // TODO: gpModelIndices
|
||||
SET_INTEGER_PARAM(0, CPickups::GenerateNewOne(pos, MI_PICKUP_PROPERTY_FORSALE, PICKUP_PROPERTY_FORSALE, GET_INTEGER_PARAM(3), 0, false, key));
|
||||
StoreParameters(&m_nIp, 1);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -379,23 +379,18 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command)
|
|||
{
|
||||
CollectParameters(&m_nIp, 1);
|
||||
CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0));
|
||||
#ifdef FIX_BUGS
|
||||
if (pVehicle->IsCar()) {
|
||||
if (((CAutomobile*)pVehicle)->m_bombType != CARBOMB_NONE) {
|
||||
((CAutomobile*)pVehicle)->m_bombType = CARBOMB_NONE;
|
||||
((CAutomobile*)pVehicle)->m_pBombRigger = nil;
|
||||
}
|
||||
}
|
||||
#ifdef FIX_BUGS
|
||||
else if (pVehicle->IsBike()) {
|
||||
if (((CBike*)pVehicle)->m_bombType != CARBOMB_NONE) {
|
||||
((CBike*)pVehicle)->m_bombType = CARBOMB_NONE;
|
||||
((CBike*)pVehicle)->m_pBombRigger = nil;
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (((CAutomobile*)pVehicle)->m_bombType != CARBOMB_NONE) {
|
||||
((CAutomobile*)pVehicle)->m_bombType = CARBOMB_NONE;
|
||||
((CAutomobile*)pVehicle)->m_pBombRigger = nil;
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
|
@ -612,7 +607,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command)
|
|||
}
|
||||
case COMMAND_SET_RC_HELI_HEIGHT_LIMIT:
|
||||
CollectParameters(&m_nIp, 1);
|
||||
// CVehicle::rcHeliHeightLimit = GET_FLOAT_PARAM(0); // TODO
|
||||
CVehicle::rcHeliHeightLimit = GET_FLOAT_PARAM(0);
|
||||
return 0;
|
||||
case COMMAND_CREATE_SCRIPT_CORONA:
|
||||
{
|
||||
|
@ -716,7 +711,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command)
|
|||
//case COMMAND_1491:
|
||||
case COMMAND_SET_DEBUG_MENU_ACTIVE:
|
||||
CollectParameters(&m_nIp, 1);
|
||||
// this sets two values on PS2, but not on mobile - TODO?
|
||||
// this sets two values on PS2 and PSP, but not on mobile - TODO?
|
||||
return 0;
|
||||
case COMMAND_SET_DRAW_HUD:
|
||||
CollectParameters(&m_nIp, 1);
|
||||
|
|
|
@ -594,13 +594,18 @@ int8 CRunningScript::ProcessCommands1500To1599(int32 command)
|
|||
// base::cWorldGeom::GetInstance()->StoreBuildingSwap(GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2), GET_INTEGER_PARAM(3) != 0);
|
||||
return 0;
|
||||
case COMMAND_IS_MULTIPLAYER_ACTIVE:
|
||||
UpdateCompareFlag(false); // TODO?
|
||||
#ifdef GTA_NETWORK
|
||||
UpdateCompareFlag(gIsMultiplayerGame);
|
||||
#else
|
||||
UpdateCompareFlag(false);
|
||||
#endif
|
||||
return 0;
|
||||
case COMMAND_GET_MULTIPLAYER_MODE:
|
||||
SET_INTEGER_PARAM(0, 0); // TODO
|
||||
StoreParameters(&m_nIp, 1);
|
||||
return 0;
|
||||
case COMMAND_MULTIPLAYER_SCRIPT_DONE:
|
||||
printf("COMMAND_MULTIPLAYER_SCRIPT_DONE\n");
|
||||
//gbStartingScriptsFromLua = false; TODO?
|
||||
return 0;
|
||||
case COMMAND_IS_MULTIPLAYER_SERVER:
|
||||
|
|
|
@ -1111,10 +1111,6 @@ enum
|
|||
MI_RCBARON = -955,
|
||||
MI_VICECHEE = -954,
|
||||
|
||||
// these two are unknown
|
||||
MI_RIO = -992,
|
||||
MI_TROPIC = -988,
|
||||
|
||||
// 7 of the following MIs originally are in this set: {-998, -996, -979, -978, -977, -975, -969}
|
||||
MI_WASHING = -3000,
|
||||
MI_ADMIRAL,
|
||||
|
|
Loading…
Reference in a new issue