summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--gamefiles/TEXT/american.gxtbin423418 -> 423450 bytes
-rw-r--r--src/control/Garages.cpp6
-rw-r--r--src/core/World.cpp6
-rw-r--r--src/core/re3.cpp2
-rw-r--r--src/render/Font.cpp13
-rw-r--r--src/render/Hud.cpp4
-rw-r--r--src/render/Renderer.cpp4
-rw-r--r--src/render/WaterLevel.cpp2
-rw-r--r--src/rw/VisibilityPlugins.cpp4
-rw-r--r--utils/gxt/american.txt3
10 files changed, 34 insertions, 10 deletions
diff --git a/gamefiles/TEXT/american.gxt b/gamefiles/TEXT/american.gxt
index 767454de..1721705d 100644
--- a/gamefiles/TEXT/american.gxt
+++ b/gamefiles/TEXT/american.gxt
Binary files differ
diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp
index 333f3a6f..7cf58d03 100644
--- a/src/control/Garages.cpp
+++ b/src/control/Garages.cpp
@@ -1285,7 +1285,7 @@ bool CGarage::IsAnyOtherCarTouchingGarage(CVehicle * pException)
uint32 i = CPools::GetVehiclePool()->GetSize();
while (i--) {
CVehicle* pVehicle = CPools::GetVehiclePool()->GetSlot(i);
- if (!pVehicle || pVehicle == pException)
+ if (!pVehicle || pVehicle == pException || pVehicle->GetStatus() == STATUS_WRECKED)
continue;
if (!IsEntityTouching3D(pVehicle))
continue;
@@ -2234,6 +2234,8 @@ void CGarages::SetAllDoorsBackToOriginalHeight()
default:
aGarages[i].RefreshDoorPointers(true);
if (aGarages[i].m_pDoor1) {
+ aGarages[i].m_pDoor1->GetMatrix().GetPosition().x = aGarages[i].m_fDoor1X;
+ aGarages[i].m_pDoor1->GetMatrix().GetPosition().y = aGarages[i].m_fDoor1Y;
aGarages[i].m_pDoor1->GetMatrix().GetPosition().z = aGarages[i].m_fDoor1Z;
if (aGarages[i].m_pDoor1->IsObject())
((CObject*)aGarages[i].m_pDoor1)->m_objectMatrix.GetPosition().z = aGarages[i].m_fDoor1Z;
@@ -2243,6 +2245,8 @@ void CGarages::SetAllDoorsBackToOriginalHeight()
aGarages[i].m_pDoor1->UpdateRwFrame();
}
if (aGarages[i].m_pDoor2) {
+ aGarages[i].m_pDoor2->GetMatrix().GetPosition().x = aGarages[i].m_fDoor2X;
+ aGarages[i].m_pDoor2->GetMatrix().GetPosition().y = aGarages[i].m_fDoor2Y;
aGarages[i].m_pDoor2->GetMatrix().GetPosition().z = aGarages[i].m_fDoor2Z;
if (aGarages[i].m_pDoor2->IsObject())
((CObject*)aGarages[i].m_pDoor2)->m_objectMatrix.GetPosition().z = aGarages[i].m_fDoor2Z;
diff --git a/src/core/World.cpp b/src/core/World.cpp
index ef1cc948..40c060c0 100644
--- a/src/core/World.cpp
+++ b/src/core/World.cpp
@@ -2239,8 +2239,12 @@ CWorld::UseDetonator(CEntity *pEntity)
{
int32 i = CPools::GetVehiclePool()->GetSize();
while(--i >= 0) {
+#ifdef FIX_BUGS
+ CVehicle* pVehicle = CPools::GetVehiclePool()->GetSlot(i);
+#else
CAutomobile *pVehicle = (CAutomobile *)CPools::GetVehiclePool()->GetSlot(i);
- if(pVehicle && !pVehicle->m_vehType && pVehicle->m_bombType == CARBOMB_REMOTE &&
+#endif
+ if(pVehicle && pVehicle->m_bombType == CARBOMB_REMOTE &&
pVehicle->m_pBombRigger == pEntity) {
pVehicle->m_bombType = CARBOMB_NONE;
pVehicle->m_nBombTimer = 500;
diff --git a/src/core/re3.cpp b/src/core/re3.cpp
index 87aca59c..4b828171 100644
--- a/src/core/re3.cpp
+++ b/src/core/re3.cpp
@@ -713,7 +713,7 @@ void CTweakVars::Add(CTweakVar *var)
TweakVarsListSize = 0;
}
if(TweakVarsListSize > 63)
- TweakVarsList = (CTweakVar**) realloc(TweakVarsList, (TweakVarsListSize + 1) * sizeof(*var));
+ TweakVarsList = (CTweakVar**) realloc(TweakVarsList, (TweakVarsListSize + 1) * sizeof(CTweakVar*));
TweakVarsList[TweakVarsListSize++] = var;
// TweakVarsList.push_back(var);
diff --git a/src/render/Font.cpp b/src/render/Font.cpp
index de1ee8b4..0f5930ee 100644
--- a/src/render/Font.cpp
+++ b/src/render/Font.cpp
@@ -406,16 +406,19 @@ CFont::DrawButton(float x, float y)
if (PS2Symbol != BUTTON_NONE) {
CRect rect;
rect.left = x;
- rect.top = Details.scaleY + Details.scaleY + y;
- rect.right = Details.scaleY * 17.0f + x;
- rect.bottom = Details.scaleY * 19.0f + y;
+ rect.top = RenderState.scaleY + RenderState.scaleY + y;
+ rect.right = RenderState.scaleY * 17.0f + x;
+ rect.bottom = RenderState.scaleY * 19.0f + y;
int vertexAlphaState;
void *raster;
RwRenderStateGet(rwRENDERSTATEVERTEXALPHAENABLE, &vertexAlphaState);
RwRenderStateGet(rwRENDERSTATETEXTURERASTER, &raster);
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void *)TRUE);
- ButtonSprite[PS2Symbol].Draw(rect, CRGBA(255, 255, 255, Details.color.a));
+ if (RenderState.bIsShadow)
+ ButtonSprite[PS2Symbol].Draw(rect, RenderState.color);
+ else
+ ButtonSprite[PS2Symbol].Draw(rect, CRGBA(255, 255, 255, RenderState.color.a));
RwRenderStateSet(rwRENDERSTATETEXTURERASTER, raster);
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void *)vertexAlphaState);
}
@@ -585,7 +588,7 @@ CFont::RenderFontBuffer()
#ifdef BUTTON_ICONS
if(PS2Symbol != BUTTON_NONE) {
DrawButton(textPosX, textPosY);
- textPosX += Details.scaleY * 17.0f;
+ textPosX += RenderState.scaleY * 17.0f;
PS2Symbol = BUTTON_NONE;
}
#endif
diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp
index 0d69c23f..ba7d52db 100644
--- a/src/render/Hud.cpp
+++ b/src/render/Hud.cpp
@@ -1173,8 +1173,10 @@ void CHud::Draw()
CFont::SetCentreOn();
CFont::SetPropOn();
#ifdef CUTSCENE_BORDERS_SWITCH
- if (!FrontEndMenuManager.m_PrefsCutsceneBorders)
+ if (!FrontEndMenuManager.m_PrefsCutsceneBorders) {
+ CFont::SetDropColor(CRGBA(0, 0, 0, 255));
CFont::SetDropShadowPosition(2);
+ }
else
#endif
CFont::SetDropShadowPosition(0);
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index 8c4714fb..dfbc02d7 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -1394,6 +1394,10 @@ CRenderer::ScanSectorPoly(RwV2d *poly, int32 numVertices, void (*scanfunc)(CPtrL
void
CRenderer::InsertEntityIntoList(CEntity *ent)
{
+#ifdef FIX_BUGS
+ if (!ent->m_rwObject) return;
+#endif
+
#ifdef NEW_RENDERER
// TODO: there are more flags being checked here
if(gbNewRenderer && (ent->IsVehicle() || ent->IsPed()))
diff --git a/src/render/WaterLevel.cpp b/src/render/WaterLevel.cpp
index 1ba615c0..3d33dbf6 100644
--- a/src/render/WaterLevel.cpp
+++ b/src/render/WaterLevel.cpp
@@ -73,7 +73,7 @@ RwRaster *gpWaterEnvBaseRaster;
RwRaster *gpWaterWakeRaster;
bool _bSeaLife;
-float _fWaterZOffset = 0.5f;
+float _fWaterZOffset = WATER_Z_OFFSET;
#ifdef PC_WATER
float fEnvScale = 0.25f;
diff --git a/src/rw/VisibilityPlugins.cpp b/src/rw/VisibilityPlugins.cpp
index bdde5e33..3a303194 100644
--- a/src/rw/VisibilityPlugins.cpp
+++ b/src/rw/VisibilityPlugins.cpp
@@ -96,6 +96,10 @@ CVisibilityPlugins::InitAlphaEntityList(void)
bool
CVisibilityPlugins::InsertEntityIntoSortedList(CEntity *e, float dist)
{
+#ifdef FIX_BUGS
+ if (!e->m_rwObject) return true;
+#endif
+
AlphaObjectInfo item;
item.entity = e;
item.sort = dist;
diff --git a/utils/gxt/american.txt b/utils/gxt/american.txt
index fcb3a80f..a91a3274 100644
--- a/utils/gxt/american.txt
+++ b/utils/gxt/american.txt
@@ -14397,6 +14397,9 @@ INVERT PAD VERTICALLY
[FEM_NON]
NONE
+[FEA_FMN]
+RADIO OFF
+
{ end of file }
[DUMMY]
THIS LABEL NEEDS TO BE HERE !!!