mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-11-05 13:45:54 +00:00
CFont crash workaround
This commit is contained in:
parent
4e4a3489ef
commit
fc0498b3a8
|
@ -437,9 +437,9 @@ void CControllerConfigManager::InitialiseControllerActionNameArray()
|
|||
SETACTIONNAME(PED_CYCLE_TARGET_LEFT);
|
||||
SETACTIONNAME(PED_CYCLE_TARGET_RIGHT);
|
||||
SETACTIONNAME(PED_CENTER_CAMERA_BEHIND_PLAYER);
|
||||
SETACTIONNAME(VEHICLE_LOOKBEHIND);
|
||||
SETACTIONNAME(PED_DUCK);
|
||||
SETACTIONNAME(PED_ANSWER_PHONE);
|
||||
SETACTIONNAME(VEHICLE_LOOKBEHIND);
|
||||
SETACTIONNAME(VEHICLE_LOOKLEFT);
|
||||
SETACTIONNAME(VEHICLE_LOOKRIGHT);
|
||||
SETACTIONNAME(VEHICLE_HORN);
|
||||
|
@ -462,6 +462,10 @@ void CControllerConfigManager::InitialiseControllerActionNameArray()
|
|||
SETACTIONNAME(GO_RIGHT);
|
||||
SETACTIONNAME(GO_FORWARD);
|
||||
SETACTIONNAME(GO_BACK);
|
||||
SETACTIONNAME(VEHICLE_TURRETLEFT);
|
||||
SETACTIONNAME(VEHICLE_TURRETRIGHT);
|
||||
SETACTIONNAME(VEHICLE_TURRETUP);
|
||||
SETACTIONNAME(VEHICLE_TURRETDOWN);
|
||||
SETACTIONNAME(NETWORK_TALK);
|
||||
SETACTIONNAME(TOGGLE_DPAD);
|
||||
SETACTIONNAME(SWITCH_DEBUG_CAM_ON);
|
||||
|
|
|
@ -6955,7 +6955,6 @@ CPed::ExitCar(void)
|
|||
// TODO(Miami): What are those?
|
||||
if (m_vehEnterType == 18 || m_vehEnterType == 8) {
|
||||
((CBike*)m_pMyVehicle)->KnockOffRider(WEAPONTYPE_UNARMED, 0, this, false);
|
||||
return;
|
||||
}
|
||||
} else if (m_pMyVehicle->IsCar()) {
|
||||
if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_ROLLOUT_LHS)) {
|
||||
|
|
|
@ -936,15 +936,27 @@ CFont::GetStringWidth(wchar *s, bool spaces)
|
|||
} else
|
||||
#endif
|
||||
{
|
||||
for (; (*s != ' ' || spaces) && *s != '\0'; s++) {
|
||||
if (*s == '~') {
|
||||
for (wchar c = *s; (c != ' ' || spaces) && c != '\0'; c = *(++s)) {
|
||||
if (c == '~') {
|
||||
|
||||
// This is original code
|
||||
#if 0
|
||||
s++;
|
||||
while (*s != '~') s++;
|
||||
s++;
|
||||
if (*s == ' ' && !spaces)
|
||||
break;
|
||||
while (*s != '~') {
|
||||
s++;
|
||||
}
|
||||
#else
|
||||
// TODO(Miami): This is my code to prevent fuck up until InsertPlayerControlKeysInString is done
|
||||
if (*(s + 1) != '~') {
|
||||
s++;
|
||||
while (*s != '~') {
|
||||
s++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
w += GetCharacterSize(c - ' ');
|
||||
}
|
||||
w += GetCharacterSize(*s - ' ');
|
||||
}
|
||||
}
|
||||
return w;
|
||||
|
|
Loading…
Reference in a new issue