mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-11-23 01:29:16 +01:00
commit
bd8a0e7305
@ -62,7 +62,10 @@ public:
|
||||
|
||||
CAnimBlendAssociation(void);
|
||||
CAnimBlendAssociation(CAnimBlendAssociation &other);
|
||||
virtual ~CAnimBlendAssociation(void);
|
||||
#ifndef FIX_BUGS
|
||||
virtual
|
||||
#endif
|
||||
~CAnimBlendAssociation(void);
|
||||
void AllocateAnimBlendNodeArray(int n);
|
||||
void FreeAnimBlendNodeArray(void);
|
||||
void Init(RpClump *clump, CAnimBlendHierarchy *hier);
|
||||
|
@ -147,11 +147,12 @@ FrameUpdateCallBackWithVelocityExtractionNonSkinned(AnimBlendFrameData *frame, v
|
||||
mat->pos.x = pos.x - transx;
|
||||
mat->pos.y = pos.y - transy;
|
||||
mat->pos.z = pos.z;
|
||||
if(mat->pos.z >= -0.8f)
|
||||
if(mat->pos.z >= -0.8f) {
|
||||
if(mat->pos.z < -0.4f)
|
||||
mat->pos.z += (2.5f * mat->pos.z + 2.0f) * frame->resetPos.z;
|
||||
else
|
||||
mat->pos.z += frame->resetPos.z;
|
||||
}
|
||||
mat->pos.x += frame->resetPos.x;
|
||||
mat->pos.y += frame->resetPos.y;
|
||||
}
|
||||
@ -361,11 +362,12 @@ FrameUpdateCallBackWithVelocityExtractionSkinned(AnimBlendFrameData *frame, void
|
||||
xform->t.x = pos.x - transx;
|
||||
xform->t.y = pos.y - transy;
|
||||
xform->t.z = pos.z;
|
||||
if(xform->t.z >= -0.8f)
|
||||
if(xform->t.z >= -0.8f) {
|
||||
if(xform->t.z < -0.4f)
|
||||
xform->t.z += (2.5f * xform->t.z + 2.0f) * frame->resetPos.z;
|
||||
else
|
||||
xform->t.z += frame->resetPos.z;
|
||||
}
|
||||
xform->t.x += frame->resetPos.x;
|
||||
xform->t.y += frame->resetPos.y;
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ ALDeviceList::ALDeviceList()
|
||||
|
||||
index = 0;
|
||||
// go through device list (each device terminated with a single NULL, list terminated with double NULL)
|
||||
while (*devices != NULL) {
|
||||
while (*devices != '\0') {
|
||||
if (strcmp(defaultDeviceName, devices) == 0) {
|
||||
defaultDeviceIndex = index;
|
||||
}
|
||||
@ -186,7 +186,7 @@ unsigned int ALDeviceList::GetMaxNumSources(int index)
|
||||
/*
|
||||
* Checks if the extension is supported on the given device
|
||||
*/
|
||||
bool ALDeviceList::IsExtensionSupported(int index, char *szExtName)
|
||||
bool ALDeviceList::IsExtensionSupported(int index, const char *szExtName)
|
||||
{
|
||||
bool bReturn = false;
|
||||
|
||||
|
@ -32,7 +32,7 @@ public:
|
||||
char *GetDeviceName(int index);
|
||||
void GetDeviceVersion(int index, int *major, int *minor);
|
||||
unsigned int GetMaxNumSources(int index);
|
||||
bool IsExtensionSupported(int index, char *szExtName);
|
||||
bool IsExtensionSupported(int index, const char *szExtName);
|
||||
int GetDefaultDevice();
|
||||
void FilterDevicesMinVer(int major, int minor);
|
||||
void FilterDevicesMaxVer(int major, int minor);
|
||||
@ -46,4 +46,4 @@ private:
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif // ALDEVICELIST_H
|
||||
#endif // ALDEVICELIST_H
|
||||
|
@ -431,6 +431,7 @@ void CCarAI::UpdateCarAI(CVehicle* pVehicle)
|
||||
}
|
||||
}
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
if (pVehicle->pDriver && pVehicle->pDriver->m_objective == OBJECTIVE_KILL_CHAR_ANY_MEANS){
|
||||
|
@ -2307,6 +2307,7 @@ void CCarCtrl::SteerAICarWithPhysicsFollowPath(CVehicle* pVehicle, float* pSwerv
|
||||
*pBrake = 0.0f;
|
||||
*pHandbrake = false;
|
||||
return;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
pCurrentLink = &ThePaths.m_carPathLinks[pVehicle->AutoPilot.m_nCurrentPathNodeInfo];
|
||||
|
@ -517,6 +517,7 @@ void CGarage::Update()
|
||||
case GARAGE_BOMBSHOP1: DMAudio.PlayFrontEndSound(SOUND_GARAGE_BOMB1_SET, 1); break;
|
||||
case GARAGE_BOMBSHOP2: DMAudio.PlayFrontEndSound(SOUND_GARAGE_BOMB2_SET, 1); break;
|
||||
case GARAGE_BOMBSHOP3: DMAudio.PlayFrontEndSound(SOUND_GARAGE_BOMB3_SET, 1); break;
|
||||
default: break;
|
||||
}
|
||||
m_eGarageState = GS_OPENING;
|
||||
if (!CGarages::BombsAreFree)
|
||||
@ -561,6 +562,7 @@ void CGarage::Update()
|
||||
case GARAGE_BOMBSHOP3:
|
||||
CHud::SetHelpMessage(TheText.Get("GA_8"), false); // Use the detonator to activate the bomb.
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
CPad::GetPad(0)->SetEnablePlayerControls(PLAYERCONTROL_GARAGE);
|
||||
FindPlayerPed()->m_pWanted->m_bIgnoredByCops = false;
|
||||
@ -1065,6 +1067,7 @@ void CGarage::Update()
|
||||
case GARAGE_HIDEOUT_ONE: StoreAndRemoveCarsForThisHideout(CGarages::aCarsInSafeHouse1, MAX_STORED_CARS_IN_INDUSTRIAL); break;
|
||||
case GARAGE_HIDEOUT_TWO: StoreAndRemoveCarsForThisHideout(CGarages::aCarsInSafeHouse2, MAX_STORED_CARS_IN_COMMERCIAL); break;
|
||||
case GARAGE_HIDEOUT_THREE: StoreAndRemoveCarsForThisHideout(CGarages::aCarsInSafeHouse3, MAX_STORED_CARS_IN_SUBURBAN); break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
UpdateDoorsHeight();
|
||||
@ -1093,6 +1096,7 @@ void CGarage::Update()
|
||||
case GARAGE_HIDEOUT_ONE: bCreatedAllCars = RestoreCarsForThisHideout(CGarages::aCarsInSafeHouse1); break;
|
||||
case GARAGE_HIDEOUT_TWO: bCreatedAllCars = RestoreCarsForThisHideout(CGarages::aCarsInSafeHouse2); break;
|
||||
case GARAGE_HIDEOUT_THREE: bCreatedAllCars = RestoreCarsForThisHideout(CGarages::aCarsInSafeHouse3); break;
|
||||
default: break;
|
||||
}
|
||||
if (bCreatedAllCars)
|
||||
m_eGarageState = GS_OPENING;
|
||||
@ -2151,6 +2155,7 @@ int32 CGarages::CountCarsInHideoutGarage(eGarageType type)
|
||||
case GARAGE_HIDEOUT_THREE:
|
||||
total += (aCarsInSafeHouse3[i].HasCar());
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
return total;
|
||||
@ -2165,6 +2170,7 @@ int32 CGarages::FindMaxNumStoredCarsForGarage(eGarageType type)
|
||||
return LIMIT_CARS_IN_COMMERCIAL;
|
||||
case GARAGE_HIDEOUT_THREE:
|
||||
return LIMIT_CARS_IN_SUBURBAN;
|
||||
default: break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -2180,6 +2186,7 @@ bool CGarages::IsPointWithinHideOutGarage(Const CVector& point)
|
||||
point.y > aGarages[i].m_fY1 && point.y < aGarages[i].m_fY2 &&
|
||||
point.z > aGarages[i].m_fZ1 && point.z < aGarages[i].m_fZ2)
|
||||
return true;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
@ -356,6 +356,7 @@ CPickup::Update(CPlayerPed *player, CVehicle *vehicle, int playerId)
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
if (!m_bRemoved && (m_eType == PICKUP_ONCE_TIMEOUT || m_eType == PICKUP_MONEY) && CTimer::GetTimeInMilliseconds() > m_nTimer)
|
||||
@ -576,6 +577,7 @@ CPickups::ModelForWeapon(eWeaponType weaponType)
|
||||
case WEAPONTYPE_FLAMETHROWER: return MI_FLAMETHROWER;
|
||||
case WEAPONTYPE_MOLOTOV: return MI_MOLOTOV;
|
||||
case WEAPONTYPE_GRENADE: return MI_GRENADE;
|
||||
default: break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -303,7 +303,7 @@ void CSceneEdit::Draw(void)
|
||||
nCommandDrawn -= (MOVIE_TOTAL_COMMANDS - 1);
|
||||
if (nCommandDrawn <= MOVIE_DO_NOTHING)
|
||||
nCommandDrawn += (MOVIE_TOTAL_COMMANDS - 1);
|
||||
sprintf(str, pCommandStrings[nCommandDrawn]);
|
||||
sprintf(str, "%s", pCommandStrings[nCommandDrawn]);
|
||||
AsciiToUnicode(str, wstr);
|
||||
CFont::SetColor(CRGBA(0, 0, 0, 0));
|
||||
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(COMMAND_NAME_X_RIGHT - SHADOW_OFFSET), SCREEN_SCALE_Y(COMMAND_NAME_Y + SHADOW_OFFSET + i * COMMAND_NAME_HEIGHT), wstr);
|
||||
@ -1095,4 +1095,4 @@ bool CSceneEdit::SelectWeapon(void)
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -11305,6 +11305,7 @@ INITSAVEBUF
|
||||
case ENTITY_TYPE_DUMMY:
|
||||
type = 4;
|
||||
handle = CPools::GetDummyPool()->GetJustIndex((CDummy*)pEntity) + 1;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
WriteSaveBuf(buf, type);
|
||||
@ -11462,6 +11463,7 @@ void CTheScripts::ClearSpaceForMissionEntity(const CVector& pos, CEntity* pEntit
|
||||
printf("Deleted a ped where a mission entity should be\n");
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ CAnimViewer::Initialise(void) {
|
||||
if (!CFileMgr::ReadLine(fd, gString, 255))
|
||||
break;
|
||||
|
||||
sscanf(gString, "%s %s", &modelName, &animGroup);
|
||||
sscanf(gString, "%s %s", modelName, animGroup);
|
||||
int groupId;
|
||||
for (groupId = 0; groupId < NUM_ANIM_ASSOC_GROUPS; groupId++) {
|
||||
if (!strcmp(animGroup, CAnimManager::GetAnimGroupName((AssocGroupId)groupId)))
|
||||
@ -429,4 +429,4 @@ CAnimViewer::Shutdown(void)
|
||||
CTimer::Shutdown();
|
||||
CStreaming::Shutdown();
|
||||
CTxdStore::RemoveTxdSlot(animTxdSlot);
|
||||
}
|
||||
}
|
||||
|
@ -885,7 +885,7 @@ CCam::PrintMode(void)
|
||||
sprintf(buf, " ");
|
||||
sprintf(buf, " ");
|
||||
|
||||
static char *modes[] = { "None",
|
||||
static Const char *modes[] = { "None",
|
||||
"Top Down", "GTA Classic", "Behind Car", "Follow Ped",
|
||||
"Aiming", "Debug", "Sniper", "Rocket", "Model Viewer", "Bill",
|
||||
"Syphon", "Circle", "Cheesy Zoom", "Wheel", "Fixed",
|
||||
|
@ -80,6 +80,10 @@ CCamera::CCamera(void)
|
||||
Init();
|
||||
}
|
||||
|
||||
CCamera::CCamera(float)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
CCamera::Init(void)
|
||||
{
|
||||
@ -87,7 +91,12 @@ CCamera::Init(void)
|
||||
float fMouseAccelHorzntl = m_fMouseAccelHorzntl;
|
||||
float fMouseAccelVertical = m_fMouseAccelVertical;
|
||||
#endif
|
||||
#ifdef FIX_BUGS
|
||||
static const CCamera DummyCamera = CCamera(0.f);
|
||||
*this = DummyCamera;
|
||||
#else
|
||||
memset(this, 0, sizeof(CCamera)); // getting rid of vtable, eh?
|
||||
#endif
|
||||
#ifdef GTA3_1_1_PATCH
|
||||
m_fMouseAccelHorzntl = fMouseAccelHorzntl;
|
||||
m_fMouseAccelVertical = fMouseAccelVertical;
|
||||
@ -740,6 +749,7 @@ CCamera::CamControl(void)
|
||||
case VEHICLE_TYPE_BOAT:
|
||||
ReqMode = CCam::MODE_BEHINDBOAT;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
// Car zoom value
|
||||
@ -2992,7 +3002,7 @@ CCamera::SetZoomValueFollowPedScript(int16 dist)
|
||||
case 0: m_fPedZoomValueScript = 0.25f; break;
|
||||
case 1: m_fPedZoomValueScript = 1.5f; break;
|
||||
case 2: m_fPedZoomValueScript = 2.9f; break;
|
||||
default: m_fPedZoomValueScript = m_fPedZoomValueScript; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
m_bUseScriptZoomValuePed = true;
|
||||
@ -3007,7 +3017,7 @@ CCamera::SetZoomValueCamStringScript(int16 dist)
|
||||
case 0: m_fCarZoomValueScript = ((CVehicle*)Cams[ActiveCam].CamTargetEntity)->IsBoat() ? FREE_BOAT_ZOOM_VALUE_1 : FREE_CAR_ZOOM_VALUE_1; break;
|
||||
case 1: m_fCarZoomValueScript = ((CVehicle*)Cams[ActiveCam].CamTargetEntity)->IsBoat() ? FREE_BOAT_ZOOM_VALUE_2 : FREE_CAR_ZOOM_VALUE_2; break;
|
||||
case 2: m_fCarZoomValueScript = ((CVehicle*)Cams[ActiveCam].CamTargetEntity)->IsBoat() ? FREE_BOAT_ZOOM_VALUE_3 : FREE_CAR_ZOOM_VALUE_3; break;
|
||||
default: m_fCarZoomValueScript = m_fCarZoomValueScript; break;
|
||||
default: break;
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
@ -3016,7 +3026,7 @@ CCamera::SetZoomValueCamStringScript(int16 dist)
|
||||
case 0: m_fCarZoomValueScript = DEFAULT_CAR_ZOOM_VALUE_1; break;
|
||||
case 1: m_fCarZoomValueScript = DEFAULT_CAR_ZOOM_VALUE_2; break;
|
||||
case 2: m_fCarZoomValueScript = DEFAULT_CAR_ZOOM_VALUE_3; break;
|
||||
default: m_fCarZoomValueScript = m_fCarZoomValueScript; break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -403,7 +403,7 @@ public:
|
||||
int m_BlurRed;
|
||||
int m_BlurType;
|
||||
|
||||
uint32 unknown; // some counter having to do with music
|
||||
uint32 unknown; // some counter having to do with music
|
||||
int m_iWorkOutSpeedThisNumFrames;
|
||||
int m_iNumFramesSoFar;
|
||||
|
||||
@ -549,6 +549,7 @@ uint32 unknown; // some counter having to do with music
|
||||
|
||||
// High level and misc
|
||||
CCamera(void);
|
||||
CCamera(float);
|
||||
void Init(void);
|
||||
void Process(void);
|
||||
void CamControl(void);
|
||||
|
@ -231,7 +231,7 @@ CCollision::SortOutCollisionAfterLoad(void)
|
||||
void
|
||||
CCollision::LoadCollisionScreen(eLevelName level)
|
||||
{
|
||||
static char *levelNames[4] = {
|
||||
static Const char *levelNames[4] = {
|
||||
"",
|
||||
"IND_ZON",
|
||||
"COM_ZON",
|
||||
|
@ -610,6 +610,7 @@ void CControllerConfigManager::AffectControllerStateOn_ButtonDown(int32 button,
|
||||
case MOUSE:
|
||||
state = &CPad::GetPad(PAD1)->PCTempMouseState;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
if (pad != NULL)
|
||||
@ -1024,7 +1025,7 @@ void CControllerConfigManager::AffectControllerStateOn_ButtonUp(int32 button, eC
|
||||
case JOYSTICK:
|
||||
state = &CPad::GetPad(PAD1)->PCTempJoyState;
|
||||
break;
|
||||
|
||||
default: break;
|
||||
}
|
||||
|
||||
if (process)
|
||||
@ -1293,6 +1294,7 @@ bool CControllerConfigManager::GetIsKeyboardKeyDown(RsKeyCodes keycode)
|
||||
if (CPad::GetPad(PAD1)->GetApps())
|
||||
return true;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -1493,6 +1495,7 @@ bool CControllerConfigManager::GetIsKeyboardKeyJustDown(RsKeyCodes keycode)
|
||||
if (CPad::GetPad(PAD1)->GetAppsJustDown())
|
||||
return true;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -1530,6 +1533,7 @@ bool CControllerConfigManager::GetIsMouseButtonDown(RsKeyCodes keycode)
|
||||
if (CPad::GetPad(PAD1)->GetMouseX2())
|
||||
return true;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -1567,6 +1571,7 @@ bool CControllerConfigManager::GetIsMouseButtonUp(RsKeyCodes keycode)
|
||||
if (CPad::GetPad(PAD1)->GetMouseX2Up())
|
||||
return true;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -1747,6 +1752,7 @@ void CControllerConfigManager::DeleteMatchingActionInitiators(e_ControllerAction
|
||||
DeleteMatchingCommonControls (action, key, type);
|
||||
DeleteMatching1rst3rdPersonControls (action, key, type);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1770,6 +1776,7 @@ bool CControllerConfigManager::GetIsKeyBlank(int32 key, eControllerType type)
|
||||
if (key != 0)
|
||||
return false;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -1836,6 +1843,7 @@ e_ControllerActionType CControllerConfigManager::GetActionType(e_ControllerActio
|
||||
case PED_SNIPER_ZOOM_OUT:
|
||||
return ACTIONTYPE_1RSTPERSON;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return ACTIONTYPE_NONE;
|
||||
@ -1861,6 +1869,7 @@ void CControllerConfigManager::ClearSettingsAssociatedWithAction(e_ControllerAct
|
||||
m_aSettings[action][type].m_Key = 0;
|
||||
m_aSettings[action][type].m_ContSetOrder = SETORDER_NONE;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
ResetSettingOrder(action);
|
||||
@ -1881,6 +1890,7 @@ wchar *CControllerConfigManager::GetControllerSettingTextWithOrderNumber(e_Contr
|
||||
return GetControllerSettingTextMouse (action);
|
||||
case JOYSTICK:
|
||||
return GetControllerSettingTextJoystick(action);
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2224,6 +2234,7 @@ wchar *CControllerConfigManager::GetControllerSettingTextKeyBoard(e_ControllerAc
|
||||
return TheText.Get("FEC_SFT"); // "SHIFT"
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2256,6 +2267,7 @@ wchar *CControllerConfigManager::GetControllerSettingTextMouse(e_ControllerActio
|
||||
case 7:
|
||||
return TheText.Get("FEC_MXT"); // MXB2
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@ -2375,6 +2387,7 @@ bool CControllerConfigManager::GetIsActionAButtonCombo(e_ControllerAction action
|
||||
case PED_CYCLE_TARGET_RIGHT:
|
||||
return true;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -2395,6 +2408,7 @@ wchar *CControllerConfigManager::GetButtonComboText(e_ControllerAction action)
|
||||
case VEHICLE_LOOKBEHIND:
|
||||
return TheText.Get("FEC_LBC"); // Use Look Left With Look Right.
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
@ -753,7 +753,7 @@ CFileLoader::LoadClumpObject(const char *line)
|
||||
char model[24], txd[24];
|
||||
CClumpModelInfo *mi;
|
||||
|
||||
if(sscanf(line, "%d %s %s", &id, &model, &txd) == 3){
|
||||
if(sscanf(line, "%d %s %s", &id, model, txd) == 3){
|
||||
mi = CModelInfo::AddClumpModel(id);
|
||||
mi->SetName(model);
|
||||
mi->SetTexDictionary(txd);
|
||||
@ -1184,7 +1184,7 @@ CFileLoader::LoadMapZones(const char *filename)
|
||||
float minx, miny, minz;
|
||||
float maxx, maxy, maxz;
|
||||
if(sscanf(line, "%s %d %f %f %f %f %f %f %d",
|
||||
&name, &type,
|
||||
name, &type,
|
||||
&minx, &miny, &minz,
|
||||
&maxx, &maxy, &maxz,
|
||||
&level) == 9)
|
||||
|
@ -412,7 +412,7 @@ CMenuManager::ThingsToDoBeforeLeavingPage()
|
||||
// ------ Functions not in the game/inlined ends
|
||||
|
||||
void
|
||||
CMenuManager::BuildStatLine(char *text, void *stat, bool itsFloat, void *stat2)
|
||||
CMenuManager::BuildStatLine(Const char *text, void *stat, bool itsFloat, void *stat2)
|
||||
{
|
||||
if (!text)
|
||||
return;
|
||||
@ -5020,6 +5020,7 @@ CMenuManager::SaveLoadFileError_SetUpErrorScreen()
|
||||
case SAVESTATUS_DELETEFAILED10:
|
||||
ChangeScreen(MENUPAGE_DELETE_FAILED, 0, true, false);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -598,7 +598,7 @@ public:
|
||||
#endif
|
||||
|
||||
public:
|
||||
static void BuildStatLine(char *text, void *stat, bool itsFloat, void *stat2);
|
||||
static void BuildStatLine(Const char *text, void *stat, bool itsFloat, void *stat2);
|
||||
static void CentreMousePointer();
|
||||
void CheckCodesForControls(int);
|
||||
bool CheckHover(int x1, int x2, int y1, int y2);
|
||||
|
@ -509,7 +509,7 @@ CMouseControllerState CMousePointerStateHelper::GetMouseSetUp()
|
||||
double xpos = 1.0f, ypos;
|
||||
glfwGetCursorPos(PSGLOBAL(window), &xpos, &ypos);
|
||||
|
||||
if (xpos != NULL) {
|
||||
if (xpos != 0.f) {
|
||||
state.MMB = true;
|
||||
state.RMB = true;
|
||||
state.LMB = true;
|
||||
@ -565,7 +565,7 @@ void CPad::UpdateMouse()
|
||||
#else
|
||||
double xpos = 1.0f, ypos;
|
||||
glfwGetCursorPos(PSGLOBAL(window), &xpos, &ypos);
|
||||
if (xpos == NULL)
|
||||
if (xpos == 0.f)
|
||||
return;
|
||||
|
||||
int32 signX = 1;
|
||||
|
@ -90,7 +90,11 @@ CPools::MakeSureSlotInObjectPoolIsEmpty(int32 slot)
|
||||
// relocate to another slot??
|
||||
CObject *newObject = new CObject(object->GetModelIndex(), false);
|
||||
CWorld::Remove(object);
|
||||
#ifdef FIX_BUGS
|
||||
*newObject = *object;
|
||||
#else
|
||||
memcpy(newObject, object, ms_pObjectPool->GetMaxEntrySize());
|
||||
#endif
|
||||
CWorld::Add(newObject);
|
||||
object->m_rwObject = nil;
|
||||
delete object;
|
||||
|
@ -7,7 +7,7 @@ float CProfile::ms_afCumulativeTime[NUM_PROFILES];
|
||||
float CProfile::ms_afEndTime[NUM_PROFILES];
|
||||
float CProfile::ms_afMaxEndTime[NUM_PROFILES];
|
||||
float CProfile::ms_afMaxCumulativeTime[NUM_PROFILES];
|
||||
char *CProfile::ms_pProfileString[NUM_PROFILES];
|
||||
Const char *CProfile::ms_pProfileString[NUM_PROFILES];
|
||||
RwRGBA CProfile::ms_aBarColours[NUM_PROFILES];
|
||||
|
||||
void CProfile::Initialise()
|
||||
@ -68,4 +68,4 @@ void CProfile::ShowResults()
|
||||
ms_afMaxCumulativeTime[PROFILE_RENDERING_TIME] = Max(ms_afMaxCumulativeTime[PROFILE_RENDERING_TIME], ms_afCumulativeTime[PROFILE_RENDERING_TIME]);
|
||||
ms_afMaxCumulativeTime[PROFILE_TOTAL] = Max(ms_afMaxCumulativeTime[PROFILE_TOTAL], ms_afCumulativeTime[PROFILE_TOTAL]);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@ -19,10 +19,10 @@ class CProfile
|
||||
static float ms_afEndTime[NUM_PROFILES];
|
||||
static float ms_afMaxEndTime[NUM_PROFILES];
|
||||
static float ms_afMaxCumulativeTime[NUM_PROFILES];
|
||||
static char *ms_pProfileString[NUM_PROFILES];
|
||||
static Const char *ms_pProfileString[NUM_PROFILES];
|
||||
static RwRGBA ms_aBarColours[NUM_PROFILES];
|
||||
public:
|
||||
static void Initialise();
|
||||
static void SuspendProfile(eProfile profile);
|
||||
static void ShowResults();
|
||||
};
|
||||
};
|
||||
|
@ -710,6 +710,7 @@ CStreaming::RequestSubway(void)
|
||||
RequestModel(MI_SUBPLATFORM_SUB, STREAMFLAGS_NOFADE);
|
||||
RequestModel(MI_SUBPLATFORM_SUB2, STREAMFLAGS_NOFADE);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -747,6 +748,7 @@ CStreaming::RequestIslands(eLevelName level)
|
||||
RequestModel(islandLODindust, BIGBUILDINGFLAGS);
|
||||
RequestModel(islandLODcomSub, BIGBUILDINGFLAGS);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1750,7 +1752,7 @@ CStreaming::ProcessLoadingChannel(int32 ch)
|
||||
void
|
||||
CStreaming::RetryLoadFile(int32 ch)
|
||||
{
|
||||
char *key;
|
||||
Const char *key;
|
||||
|
||||
CPad::StopPadsShaking();
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
float CSurfaceTable::ms_aAdhesiveLimitTable[NUMADHESIVEGROUPS][NUMADHESIVEGROUPS];
|
||||
|
||||
void
|
||||
CSurfaceTable::Initialise(char *filename)
|
||||
CSurfaceTable::Initialise(Const char *filename)
|
||||
{
|
||||
int lineno, fieldno;
|
||||
char *line;
|
||||
|
@ -100,7 +100,7 @@ class CSurfaceTable
|
||||
{
|
||||
static float ms_aAdhesiveLimitTable[NUMADHESIVEGROUPS][NUMADHESIVEGROUPS];
|
||||
public:
|
||||
static void Initialise(char *filename);
|
||||
static void Initialise(Const char *filename);
|
||||
static int GetAdhesionGroup(uint8 surfaceType);
|
||||
static float GetWetMultiplier(uint8 surfaceType);
|
||||
static float GetAdhesiveLimit(CColPoint &colpoint);
|
||||
|
@ -2205,6 +2205,7 @@ CWorld::TriggerExplosionSectorList(CPtrList &list, const CVector &position, floa
|
||||
case ENTITY_TYPE_OBJECT:
|
||||
pObject->ObjectDamage(300.0f * fDamageMultiplier);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -357,7 +357,7 @@ CTheZones::FindSmallestZonePositionILN(const CVector *v)
|
||||
}
|
||||
|
||||
int16
|
||||
CTheZones::FindZoneByLabelAndReturnIndex(char *name)
|
||||
CTheZones::FindZoneByLabelAndReturnIndex(Const char *name)
|
||||
{
|
||||
char str[8];
|
||||
memset(str, 0, 8);
|
||||
|
@ -86,7 +86,7 @@ public:
|
||||
static CZone *FindSmallestZonePosition(const CVector *v);
|
||||
static CZone *FindSmallestZonePositionType(const CVector *v, eZoneType type);
|
||||
static CZone *FindSmallestZonePositionILN(const CVector *v);
|
||||
static int16 FindZoneByLabelAndReturnIndex(char *name);
|
||||
static int16 FindZoneByLabelAndReturnIndex(Const char *name);
|
||||
static CZoneInfo *GetZoneInfo(const CVector *v, uint8 day);
|
||||
static void GetZoneInfoForTimeOfDay(const CVector *pos, CZoneInfo *info);
|
||||
static void SetZoneCarInfo(uint16 zoneid, uint8 day, int16 carDensity,
|
||||
|
@ -401,7 +401,7 @@ DestroySplashScreen(void)
|
||||
splashTxdId = -1;
|
||||
}
|
||||
|
||||
char*
|
||||
Const char*
|
||||
GetRandomSplashScreen(void)
|
||||
{
|
||||
int index;
|
||||
@ -424,10 +424,10 @@ GetRandomSplashScreen(void)
|
||||
return splashName;
|
||||
}
|
||||
|
||||
char*
|
||||
Const char*
|
||||
GetLevelSplashScreen(int level)
|
||||
{
|
||||
static char *splashScreens[4] = {
|
||||
static Const char *splashScreens[4] = {
|
||||
nil,
|
||||
"splash1",
|
||||
"splash2",
|
||||
@ -1278,7 +1278,7 @@ void TheGame(void)
|
||||
CGame::Initialise("DATA\\GTA3.DAT");
|
||||
#endif
|
||||
|
||||
char *splash = GetRandomSplashScreen(); // inlined here
|
||||
Const char *splash = GetRandomSplashScreen(); // inlined here
|
||||
|
||||
LoadingScreen("Starting Game", NULL, splash);
|
||||
|
||||
@ -1312,7 +1312,7 @@ void TheGame(void)
|
||||
if (FrontEndMenuManager.m_bWantToLoad)
|
||||
#endif
|
||||
{
|
||||
char *splash1 = GetLevelSplashScreen(CGame::currLevel);
|
||||
Const char *splash1 = GetLevelSplashScreen(CGame::currLevel);
|
||||
LoadSplash(splash1);
|
||||
}
|
||||
|
||||
|
@ -22,8 +22,8 @@ void LoadingScreen(const char *str1, const char *str2, const char *splashscreen)
|
||||
void LoadingIslandScreen(const char *levelName);
|
||||
CSprite2d *LoadSplash(const char *name);
|
||||
void DestroySplashScreen(void);
|
||||
char *GetLevelSplashScreen(int level);
|
||||
char *GetRandomSplashScreen(void);
|
||||
Const char *GetLevelSplashScreen(int level);
|
||||
Const char *GetRandomSplashScreen(void);
|
||||
void LittleTest(void);
|
||||
void ValidateVersion();
|
||||
void ResetLoadingScreenBar(void);
|
||||
|
@ -180,7 +180,7 @@ CPedModelInfo::SetLowDetailClump(RpClump *lodclump)
|
||||
|
||||
struct ColNodeInfo
|
||||
{
|
||||
char *name;
|
||||
Const char *name;
|
||||
int pedNode;
|
||||
int pieceType;
|
||||
float x, z;
|
||||
|
@ -61,7 +61,7 @@ CParticleObject::CParticleObject() :
|
||||
m_nState(POBJECTSTATE_INITIALISED),
|
||||
m_pNext(NULL),
|
||||
m_pPrev(NULL),
|
||||
m_nRemoveTimer(NULL)
|
||||
m_nRemoveTimer(0)
|
||||
|
||||
{
|
||||
;
|
||||
@ -1127,13 +1127,21 @@ CParticleObject::SaveParticle(uint8 *buffer, uint32 *length)
|
||||
|
||||
for ( CParticleObject *p = pCloseListHead; p != NULL; p = p->m_pNext )
|
||||
{
|
||||
#ifdef FIX_BUGS
|
||||
*(CParticleObject*)buffer = *p;
|
||||
#else
|
||||
memcpy(buffer, p, sizeof(CParticleObject));
|
||||
#endif
|
||||
buffer += sizeof(CParticleObject);
|
||||
}
|
||||
|
||||
for ( CParticleObject *p = pFarListHead; p != NULL; p = p->m_pNext )
|
||||
{
|
||||
#ifdef FIX_BUGS
|
||||
*(CParticleObject*)buffer = *p;
|
||||
#else
|
||||
memcpy(buffer, p, sizeof(CParticleObject));
|
||||
#endif
|
||||
buffer += sizeof(CParticleObject);
|
||||
}
|
||||
|
||||
|
@ -166,6 +166,7 @@ CEmergencyPed::FiremanAI(void)
|
||||
m_nEmergencyPedState = EMERGENCY_PED_READY;
|
||||
SetMoveState(PEDMOVE_WALK);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -410,6 +411,7 @@ CEmergencyPed::MedicAI(void)
|
||||
m_nEmergencyPedState = EMERGENCY_PED_READY;
|
||||
SetMoveState(PEDMOVE_WALK);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5048,13 +5048,13 @@ CPed::LoadFightData(void)
|
||||
sscanf(
|
||||
&line[lp],
|
||||
"%s %f %f %f %f %c %s %d %d",
|
||||
&moveName,
|
||||
moveName,
|
||||
&startFireTime,
|
||||
&endFireTime,
|
||||
&comboFollowOnTime,
|
||||
&strikeRadius,
|
||||
&hitLevel,
|
||||
&animName,
|
||||
animName,
|
||||
&damage,
|
||||
&flags);
|
||||
|
||||
@ -10686,6 +10686,7 @@ CPed::ProcessControl(void)
|
||||
Say(SOUND_PED_HANDS_UP);
|
||||
}
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
SetMoveAnim();
|
||||
if (bPedIsBleeding) {
|
||||
@ -11810,8 +11811,10 @@ CPed::PedSetInCarCB(CAnimBlendAssociation *animAssoc, void *arg)
|
||||
}
|
||||
|
||||
} else if (ped->m_objective == OBJECTIVE_ENTER_CAR_AS_PASSENGER) {
|
||||
switch (ped->m_vehEnterType) {
|
||||
if (!veh->bIsBus) {
|
||||
if (veh->bIsBus) {
|
||||
veh->AddPassenger(ped);
|
||||
} else {
|
||||
switch (ped->m_vehEnterType) {
|
||||
case CAR_DOOR_RF:
|
||||
veh->AddPassenger(ped, 0);
|
||||
break;
|
||||
@ -11821,10 +11824,10 @@ CPed::PedSetInCarCB(CAnimBlendAssociation *animAssoc, void *arg)
|
||||
case CAR_DOOR_LR:
|
||||
veh->AddPassenger(ped, 1);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
veh->AddPassenger(ped);
|
||||
default:
|
||||
veh->AddPassenger(ped);
|
||||
break;
|
||||
}
|
||||
}
|
||||
ped->m_nPedState = PED_DRIVING;
|
||||
if (ped->m_prevObjective == OBJECTIVE_RUN_TO_AREA || ped->m_prevObjective == OBJECTIVE_GOTO_CHAR_ON_FOOT || ped->m_prevObjective == OBJECTIVE_KILL_CHAR_ON_FOOT)
|
||||
@ -17119,6 +17122,7 @@ CPed::SetObjective(eObjective newObj, CVector dest)
|
||||
if (sq(m_distanceToCountSeekDone) > (m_nextRoutePointPos - GetPosition()).MagnitudeSqr2D())
|
||||
return;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
if (IsTemporaryObjective(m_objective)) {
|
||||
|
@ -984,6 +984,7 @@ CParticle *CParticle::AddParticle(tParticleType type, CVector const &vecPos, CVe
|
||||
case PARTICLE_WATER_HYDRANT:
|
||||
pParticle->m_vecPosition.z += 20.0f * psystem->m_fPositionRandomError * ms_afRandTable[CGeneral::GetRandomNumber() % RAND_TABLE_SIZE];
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
if ( fSize != 0.0f )
|
||||
@ -1214,6 +1215,7 @@ void CParticle::Update()
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1295,6 +1297,7 @@ void CParticle::Update()
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1174,6 +1174,7 @@ CRenderer::IsEntityCullZoneVisible(CEntity *ent)
|
||||
if(!obj->IsStatic())
|
||||
return true;
|
||||
return !(obj->m_pCurSurface && obj->m_pCurSurface->bZoneCulled2);
|
||||
default: break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -1182,12 +1183,14 @@ bool
|
||||
CRenderer::IsVehicleCullZoneVisible(CEntity *ent)
|
||||
{
|
||||
CVehicle *v = (CVehicle*)ent;
|
||||
switch(v->GetStatus())
|
||||
switch(v->GetStatus()) {
|
||||
case STATUS_SIMPLE:
|
||||
case STATUS_PHYSICS:
|
||||
case STATUS_ABANDONED:
|
||||
case STATUS_WRECKED:
|
||||
return !(v->m_pCurGroundEntity && v->m_pCurGroundEntity->bZoneCulled2);
|
||||
default: break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ const float fBlueMult = 1.4f;
|
||||
|
||||
|
||||
void
|
||||
CWaterLevel::Initialise(char *pWaterDat)
|
||||
CWaterLevel::Initialise(Const char *pWaterDat)
|
||||
{
|
||||
ms_nNoOfWaterLevels = 0;
|
||||
|
||||
|
@ -79,7 +79,7 @@ class CWaterLevel
|
||||
static int16 nGeomUsed;
|
||||
|
||||
public:
|
||||
static void Initialise(char *pWaterDat);
|
||||
static void Initialise(Const char *pWaterDat);
|
||||
static void Shutdown();
|
||||
static void CreateWavyAtomic();
|
||||
static void DestroyWavyAtomic();
|
||||
|
@ -231,7 +231,7 @@ CVisibilityPlugins::RenderFadingAtomic(RpAtomic *atomic, float camdist)
|
||||
{
|
||||
RpAtomic *lodatm;
|
||||
float fadefactor;
|
||||
uint8 alpha;
|
||||
uint32 alpha;
|
||||
CSimpleModelInfo *mi;
|
||||
|
||||
mi = GetAtomicModelInfo(atomic);
|
||||
@ -730,11 +730,13 @@ CVisibilityPlugins::SetAtomicModelInfo(RpAtomic *atomic,
|
||||
{
|
||||
AtomicExt *ext = ATOMICEXT(atomic);
|
||||
ext->modelInfo = modelInfo;
|
||||
switch (modelInfo->GetModelType())
|
||||
case MITYPE_SIMPLE:
|
||||
case MITYPE_TIME:
|
||||
if(modelInfo->m_normalCull)
|
||||
SetAtomicRenderCallback(atomic, RenderObjNormalAtomic);
|
||||
switch (modelInfo->GetModelType()) {
|
||||
case MITYPE_SIMPLE:
|
||||
case MITYPE_TIME:
|
||||
if(modelInfo->m_normalCull)
|
||||
SetAtomicRenderCallback(atomic, RenderObjNormalAtomic);
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
CSimpleModelInfo*
|
||||
@ -851,6 +853,7 @@ CVisibilityPlugins::SetClumpModelInfo(RpClump *clump, CClumpModelInfo *modelInfo
|
||||
else
|
||||
CLUMPEXT(clump)->visibilityCB = VehicleVisibilityCB;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -246,7 +246,7 @@ GenericLoad()
|
||||
|
||||
// Load SimpleVars and Scripts
|
||||
CheckSum = 0;
|
||||
CDate(CompileDateAndTime);
|
||||
CDate dummy; // unused
|
||||
CPad::ResetCheats();
|
||||
if (!ReadInSizeofSaveFileBuffer(file, size))
|
||||
return false;
|
||||
|
@ -429,7 +429,7 @@ RwChar **_psGetVideoModeList()
|
||||
if ( vm.flags & rwVIDEOMODEEXCLUSIVE )
|
||||
{
|
||||
_VMList[i] = (RwChar*)RwCalloc(100, sizeof(RwChar));
|
||||
rwsprintf(_VMList[i],"%lu X %lu X %lu", vm.width, vm.height, vm.depth);
|
||||
rwsprintf(_VMList[i],"%d X %d X %d", vm.width, vm.height, vm.depth);
|
||||
}
|
||||
else
|
||||
_VMList[i] = nil;
|
||||
|
@ -252,6 +252,7 @@ CAutomobile::ProcessControl(void)
|
||||
strongGrip2 = true;
|
||||
}
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -423,6 +424,7 @@ CAutomobile::ProcessControl(void)
|
||||
m_fGasPedal = 0.0f;
|
||||
m_nCarHornTimer = 0;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
// what's going on here?
|
||||
@ -1259,6 +1261,7 @@ CAutomobile::PreRender(void)
|
||||
m_aWheelColPoints[i].point + CVector(0.0f, 0.0f, 0.05f),
|
||||
CVector(0.0f, 0.0f, 0.0f), nil, 0.1f);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
@ -1383,6 +1386,7 @@ CAutomobile::PreRender(void)
|
||||
GetForward().x, GetForward().y,
|
||||
&m_aWheelSkidmarkMuddy[CARWHEEL_REAR_LEFT], &m_aWheelSkidmarkBloody[CARWHEEL_REAR_LEFT]);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
switch(m_aWheelState[CARWHEEL_REAR_RIGHT]){
|
||||
@ -1400,6 +1404,7 @@ CAutomobile::PreRender(void)
|
||||
GetForward().x, GetForward().y,
|
||||
&m_aWheelSkidmarkMuddy[CARWHEEL_REAR_RIGHT], &m_aWheelSkidmarkBloody[CARWHEEL_REAR_RIGHT]);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1851,7 +1856,7 @@ CAutomobile::PreRender(void)
|
||||
false);
|
||||
CVector pos = GetPosition() - 4.0f*GetForward();
|
||||
if(Damage.GetLightStatus(VEHLIGHT_REAR_LEFT) == LIGHT_STATUS_OK ||
|
||||
Damage.GetLightStatus(VEHLIGHT_REAR_RIGHT) == LIGHT_STATUS_OK)
|
||||
Damage.GetLightStatus(VEHLIGHT_REAR_RIGHT) == LIGHT_STATUS_OK) {
|
||||
if(m_fBrakePedal > 0.0f)
|
||||
CPointLights::AddLight(CPointLights::LIGHT_POINT, pos, CVector(0.0f, 0.0f, 0.0f),
|
||||
10.0f, 1.0f, 0.0f, 0.0f,
|
||||
@ -1860,6 +1865,7 @@ CAutomobile::PreRender(void)
|
||||
CPointLights::AddLight(CPointLights::LIGHT_POINT, pos, CVector(0.0f, 0.0f, 0.0f),
|
||||
7.0f, 0.6f, 0.0f, 0.0f,
|
||||
CPointLights::FOG_NONE, false);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
// Lights off
|
||||
@ -3781,6 +3787,7 @@ CAutomobile::IsDoorReady(eDoors door)
|
||||
case DOOR_FRONT_RIGHT: doorflag = CAR_DOOR_FLAG_RF; break;
|
||||
case DOOR_REAR_LEFT: doorflag = CAR_DOOR_FLAG_LR; break;
|
||||
case DOOR_REAR_RIGHT: doorflag = CAR_DOOR_FLAG_RR; break;
|
||||
default: break;
|
||||
}
|
||||
return (doorflag & m_nGettingInFlags) == 0;
|
||||
}
|
||||
|
@ -180,6 +180,7 @@ CBoat::ProcessControl(void)
|
||||
return;
|
||||
}
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
float collisionDamage = pHandling->fCollisionDamageMultiplier * m_fDamageImpulse;
|
||||
|
@ -85,6 +85,7 @@ CDamageManager::ApplyDamage(tComponent component, float damage, float unused)
|
||||
ProgressEngineDamage();
|
||||
ProgressPanelDamage(subComp);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -996,7 +996,7 @@ CHeli::TestRocketCollision(CVector *rocketPos)
|
||||
|
||||
for(i = 0; i < NUM_HELIS; i++){
|
||||
if(pHelis[i] && !pHelis[i]->bExplosionProof && (*rocketPos - pHelis[i]->GetPosition()).MagnitudeSqr() < sq(8.0f)){
|
||||
pHelis[i]->m_fAngularSpeed = (CGeneral::GetRandomNumber() < RAND_MAX/2) ? 0.05f : -0.05f;
|
||||
pHelis[i]->m_fAngularSpeed = CGeneral::GetRandomTrueFalse() ? 0.05f : -0.05f;
|
||||
pHelis[i]->m_heliStatus = HELI_STATUS_SHOT_DOWN;
|
||||
pHelis[i]->m_nExplosionTimer = CTimer::GetTimeInMilliseconds() + 10000;
|
||||
hit = true;
|
||||
@ -1023,7 +1023,7 @@ CHeli::TestBulletCollision(CVector *line0, CVector *line1, CVector *bulletPos, i
|
||||
|
||||
if(pHelis[i]->m_heliType == HELI_CATALINA && pHelis[i]->m_nBulletDamage > 400 ||
|
||||
pHelis[i]->m_heliType != HELI_CATALINA && pHelis[i]->m_nBulletDamage > 700){
|
||||
pHelis[i]->m_fAngularSpeed = (CGeneral::GetRandomNumber() < RAND_MAX/2) ? 0.05f : -0.05f;
|
||||
pHelis[i]->m_fAngularSpeed = CGeneral::GetRandomTrueFalse() ? 0.05f : -0.05f;
|
||||
pHelis[i]->m_heliStatus = HELI_STATUS_SHOT_DOWN;
|
||||
pHelis[i]->m_nExplosionTimer = CTimer::GetTimeInMilliseconds() + 10000;
|
||||
}
|
||||
|
@ -492,7 +492,7 @@ CTrain::Shutdown(void)
|
||||
}
|
||||
|
||||
void
|
||||
CTrain::ReadAndInterpretTrackFile(char *filename, CTrainNode **nodes, int16 *numNodes, int32 numStations, float *stationDists,
|
||||
CTrain::ReadAndInterpretTrackFile(Const char *filename, CTrainNode **nodes, int16 *numNodes, int32 numStations, float *stationDists,
|
||||
float *totalLength, float *totalDuration, CTrainInterpolationLine *interpLines, bool rightRail)
|
||||
{
|
||||
bool readingFile = false;
|
||||
|
@ -87,7 +87,7 @@ public:
|
||||
|
||||
static void InitTrains(void);
|
||||
static void Shutdown(void);
|
||||
static void ReadAndInterpretTrackFile(char *filename, CTrainNode **nodes, int16 *numNodes, int32 numStations, float *stationDists,
|
||||
static void ReadAndInterpretTrackFile(Const char *filename, CTrainNode **nodes, int16 *numNodes, int32 numStations, float *stationDists,
|
||||
float *totalLength, float *totalDuration, CTrainInterpolationLine *interpLines, bool rightRail);
|
||||
static void UpdateTrains(void);
|
||||
};
|
||||
|
@ -200,6 +200,7 @@ void CBulletInfo::Update(void)
|
||||
case ENTITY_TYPE_VEHICLE:
|
||||
DMAudio.PlayOneShot(((CVehicle*)pHitEntity)->m_audioEntityId, SOUND_WEAPON_HIT_VEHICLE, 1.0f);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
CGlass::WasGlassHitByBullet(pHitEntity, point.point);
|
||||
|
@ -116,6 +116,7 @@ CProjectileInfo::AddProjectile(CEntity *entity, eWeaponType weapon, CVector pos,
|
||||
elasticity = 0.5f;
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
@ -137,6 +138,7 @@ CProjectileInfo::AddProjectile(CEntity *entity, eWeaponType weapon, CVector pos,
|
||||
case WEAPONTYPE_GRENADE:
|
||||
ms_apProjectile[i] = new CProjectile(MI_GRENADE);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
if (ms_apProjectile[i] == nil)
|
||||
@ -183,6 +185,7 @@ CProjectileInfo::RemoveNotAdd(CEntity *entity, eWeaponType weaponType, CVector p
|
||||
case WEAPONTYPE_ROCKETLAUNCHER:
|
||||
CExplosion::AddExplosion(nil, entity, EXPLOSION_ROCKET, pos, 0);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -806,6 +806,7 @@ CWeapon::FireInstantHit(CEntity *shooter, CVector *fireSource)
|
||||
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
|
||||
DoBulletImpact(shooter, victim, fireSource, &target, &point, ahead);
|
||||
@ -1070,6 +1071,7 @@ CWeapon::DoBulletImpact(CEntity *shooter, CEntity *victim,
|
||||
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1101,6 +1103,7 @@ CWeapon::DoBulletImpact(CEntity *shooter, CEntity *victim,
|
||||
PlayOneShotScriptObject(SCRIPT_SOUND_BULLET_HIT_GROUND_3, point->point);
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1328,6 +1331,7 @@ CWeapon::FireShotgun(CEntity *shooter, CVector *fireSource)
|
||||
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1359,6 +1363,7 @@ CWeapon::FireShotgun(CEntity *shooter, CVector *fireSource)
|
||||
PlayOneShotScriptObject(SCRIPT_SOUND_BULLET_HIT_GROUND_3, point.point);
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1768,6 +1773,7 @@ CWeapon::FireInstantHitFromCar(CAutomobile *shooter, bool left)
|
||||
PlayOneShotScriptObject(SCRIPT_SOUND_BULLET_HIT_GROUND_3, point.point);
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -2037,6 +2043,7 @@ CWeapon::Update(int32 audioEntity)
|
||||
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2131,6 +2138,7 @@ FireOneInstantHitRound(CVector *source, CVector *target, int32 damage)
|
||||
PlayOneShotScriptObject(SCRIPT_SOUND_BULLET_HIT_GROUND_3, point.point);
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -105,8 +105,8 @@ CWeaponInfo::LoadWeaponData(void)
|
||||
sscanf(
|
||||
&line[lp],
|
||||
"%s %s %f %d %d %d %d %f %f %f %f %f %f %f %s %s %f %f %f %f %d %d",
|
||||
&weaponName,
|
||||
&fireType,
|
||||
weaponName,
|
||||
fireType,
|
||||
&range,
|
||||
&firingRate,
|
||||
&reload,
|
||||
@ -119,8 +119,8 @@ CWeaponInfo::LoadWeaponData(void)
|
||||
&fireOffsetX,
|
||||
&fireOffsetY,
|
||||
&fireOffsetZ,
|
||||
&animToPlay,
|
||||
&anim2ToPlay,
|
||||
animToPlay,
|
||||
anim2ToPlay,
|
||||
&animLoopStart,
|
||||
&animLoopEnd,
|
||||
&delayBetweenAnimAndFire,
|
||||
@ -201,4 +201,4 @@ CWeaponInfo::Shutdown(void)
|
||||
{
|
||||
debug("Shutting down CWeaponInfo...\n");
|
||||
debug("CWeaponInfo shut down\n");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user