summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-04-16 01:00:38 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-04-16 01:00:38 +0200
commit22c84356b1282a5326d5e4e939b492793014c704 (patch)
tree6731f9eac93e7b1200814043200693cc9b63c4f2 /src
parentMerge remote-tracking branch 'upstream/master' (diff)
parentFixed bridge despawns (diff)
downloadre3-22c84356b1282a5326d5e4e939b492793014c704.tar
re3-22c84356b1282a5326d5e4e939b492793014c704.tar.gz
re3-22c84356b1282a5326d5e4e939b492793014c704.tar.bz2
re3-22c84356b1282a5326d5e4e939b492793014c704.tar.lz
re3-22c84356b1282a5326d5e4e939b492793014c704.tar.xz
re3-22c84356b1282a5326d5e4e939b492793014c704.tar.zst
re3-22c84356b1282a5326d5e4e939b492793014c704.zip
Diffstat (limited to 'src')
-rw-r--r--src/peds/Population.cpp12
-rw-r--r--src/render/Hud.cpp6
-rw-r--r--src/weapons/Explosion.cpp2
-rw-r--r--src/weapons/Explosion.h2
-rw-r--r--src/weapons/ProjectileInfo.cpp4
-rw-r--r--src/weapons/ProjectileInfo.h8
-rw-r--r--src/weapons/WeaponEffects.cpp (renamed from src/render/WeaponEffects.cpp)0
-rw-r--r--src/weapons/WeaponEffects.h (renamed from src/render/WeaponEffects.h)0
8 files changed, 16 insertions, 18 deletions
diff --git a/src/peds/Population.cpp b/src/peds/Population.cpp
index e26e2eaf..d3a67a57 100644
--- a/src/peds/Population.cpp
+++ b/src/peds/Population.cpp
@@ -35,17 +35,17 @@ const RegenerationPoint aSafeZones[] = {
CVector(790.0f, -917.0f, 39.0f), CVector(775.0f, -921.0f, 39.0f), CVector(424.0f, -942.0f, 38.0f), CVector(439.0f, -938.0f, 38.0f) },
{ LEVEL_INDUSTRIAL, LEVEL_COMMERCIAL, 555.0f, 711.0f, 118.0f, 186.0f, -30.0f, -10.0f,
CVector(698.0f, 182.0f, -20.0f), CVector(681.0f, 178.0f, -20.0f), CVector(586.0f, 144.0f, -20.0f), CVector(577.0f, 135.0f, -20.0f) },
- { LEVEL_INDUSTRIAL, LEVEL_COMMERCIAL, 26.0f, 44.0f, 124.0f, 87.0f, 20.0f, 6.0f,
+ { LEVEL_INDUSTRIAL, LEVEL_COMMERCIAL, 626.0f, 744.0f, -124.0f, -87.0f, -20.0f, -6.0f,
CVector(736.0f, -117.0f, -13.0f), CVector(730.0f, -115.0f, -13.0f), CVector(635.0f, -93.0f, -12.5f), CVector(650.0f, -89.0f, -12.5f) },
- { LEVEL_INDUSTRIAL, LEVEL_COMMERCIAL, 45.0f, 34.0f, 780.0f, 750.0f, 25.0f, 6.0f,
+ { LEVEL_INDUSTRIAL, LEVEL_COMMERCIAL, 645.0f, 734.0f, -780.0f, -750.0f, -25.0f, -6.0f,
CVector(729.0f, -764.0f, -18.0f), CVector(720.0f, -769.0f, -17.0f), CVector(652.0f, -774.0f, -10.5f), CVector(659.0f, -770.0f, -10.5f) },
- { LEVEL_COMMERCIAL, LEVEL_SUBURBAN, 532.0f, 136.0f, 668.0f, 599.0f, 4.0f, 0.0f,
+ { LEVEL_COMMERCIAL, LEVEL_SUBURBAN, -532.0f, -136.0f, -668.0f, -599.0f, 34.0f, 60.0f,
CVector(-172.0f, -619.0f, 44.0f), CVector(-183.0f, -623.0f, 44.0f), CVector(-511.0f, -645.0f, 41.0f), CVector(-493.0f, -639.0f, 41.5f) },
- { LEVEL_COMMERCIAL, LEVEL_SUBURBAN, 325.0f, 175.0f, 7.0f, 5.0f, 30.0f, 10.0f,
+ { LEVEL_COMMERCIAL, LEVEL_SUBURBAN, -325.0f, -175.0f, 27.0f, 75.0f, -30.0f, -10.0f,
CVector(-185.0f, 40.8f, -20.5f), CVector(-202.0f, 37.0f, -20.5f), CVector(-315.0f, 65.5f, -20.5f), CVector(-306.0f, 62.4f, -20.5f) },
- { LEVEL_COMMERCIAL, LEVEL_SUBURBAN, 410.0f, 310.0f, 1055.0f, 1030.0f, 20.0f, 6.0f,
+ { LEVEL_COMMERCIAL, LEVEL_SUBURBAN, -410.0f, -310.0f, -1055.0f, -1030.0f, -20.0f, -6.0f,
CVector(-321.0f, -1043.0f, -13.2f), CVector(-328.0f, -1045.0f, -13.2f), CVector(-398.0f, -1044.0f, -13.5f), CVector(-390.0f, -1040.5f, -13.5f) },
- { LEVEL_COMMERCIAL, LEVEL_SUBURBAN, 425.0f, 280.0f, 471.0f, 447.0f, 20.0f, 5.0f,
+ { LEVEL_COMMERCIAL, LEVEL_SUBURBAN, -425.0f, -280.0f, -471.0f, -447.0f, -20.0f, -5.0f,
CVector(-292.0f, -457.0f, -11.6f), CVector(-310.0f, -461.0f, -11.6f), CVector(-413.0f, -461.0f, -11.5f), CVector(-399.0f, -457.0f, -11.3f) }
};
diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp
index f8b86bd2..9529c4c1 100644
--- a/src/render/Hud.cpp
+++ b/src/render/Hud.cpp
@@ -144,12 +144,10 @@ void CHud::Draw()
float fMultBright = SpriteBrightness * 0.03f * (0.25f * fStep + 0.75f);
CRect rect;
if (DrawCrossHairPC && TheCamera.Cams[TheCamera.ActiveCam].Using3rdPersonMouseCam()) {
-#ifndef ASPECT_RATIO_SCALE
float f3rdX = SCREEN_WIDTH * TheCamera.m_f3rdPersonCHairMultX;
float f3rdY = SCREEN_HEIGHT * TheCamera.m_f3rdPersonCHairMultY;
-#else
- float f3rdX = (((TheCamera.m_f3rdPersonCHairMultX - 0.5f) / ((CDraw::GetAspectRatio()) / (DEFAULT_ASPECT_RATIO))) + 0.5f) * SCREEN_WIDTH;
- float f3rdY = SCREEN_HEIGHT * TheCamera.m_f3rdPersonCHairMultY + SCREEN_SCALE_Y(-2.0f);
+#ifdef ASPECT_RATIO_SCALE
+ f3rdY -= SCREEN_SCALE_Y(2.0f);
#endif
if (FindPlayerPed() && WeaponType == WEAPONTYPE_M16) {
rect.left = f3rdX - SCREEN_SCALE_X(32.0f * 0.6f);
diff --git a/src/weapons/Explosion.cpp b/src/weapons/Explosion.cpp
index 3d00052a..02243702 100644
--- a/src/weapons/Explosion.cpp
+++ b/src/weapons/Explosion.cpp
@@ -19,7 +19,7 @@
#include "WaterLevel.h"
#include "World.h"
-CExplosion(&gaExplosion)[NUM_EXPLOSIONS] = *(CExplosion(*)[NUM_EXPLOSIONS])*(uintptr*)0x64E208;
+CExplosion gaExplosion[NUM_EXPLOSIONS];
// these two were not initialised in original code, I'm really not sure what were they meant to be
RwRGBA colMedExpl = { 0, 0, 0, 0 };
diff --git a/src/weapons/Explosion.h b/src/weapons/Explosion.h
index 45e2d5bb..bf54328c 100644
--- a/src/weapons/Explosion.h
+++ b/src/weapons/Explosion.h
@@ -46,4 +46,4 @@ public:
static void RemoveAllExplosionsInArea(CVector pos, float radius);
};
-extern CExplosion (&gaExplosion)[NUM_EXPLOSIONS]; \ No newline at end of file
+extern CExplosion gaExplosion[NUM_EXPLOSIONS]; \ No newline at end of file
diff --git a/src/weapons/ProjectileInfo.cpp b/src/weapons/ProjectileInfo.cpp
index b33d2d62..8f04278c 100644
--- a/src/weapons/ProjectileInfo.cpp
+++ b/src/weapons/ProjectileInfo.cpp
@@ -13,8 +13,8 @@
#include "Weapon.h"
#include "World.h"
-CProjectileInfo (&gaProjectileInfo)[NUM_PROJECTILES] = *(CProjectileInfo(*)[NUM_PROJECTILES])*(uintptr*)0x64ED50;
-CProjectile* (&CProjectileInfo::ms_apProjectile)[NUM_PROJECTILES] = *(CProjectile*(*)[NUM_PROJECTILES])*(uintptr*)0x87C748;
+CProjectileInfo gaProjectileInfo[NUM_PROJECTILES];
+CProjectile *CProjectileInfo::ms_apProjectile[NUM_PROJECTILES];
void
CProjectileInfo::Initialise()
diff --git a/src/weapons/ProjectileInfo.h b/src/weapons/ProjectileInfo.h
index a4ea369a..b88322f9 100644
--- a/src/weapons/ProjectileInfo.h
+++ b/src/weapons/ProjectileInfo.h
@@ -9,14 +9,14 @@ class CProjectileInfo
{
public:
eWeaponType m_eWeaponType;
- CEntity* m_pSource;
+ CEntity *m_pSource;
uint32 m_nExplosionTime;
bool m_bInUse;
CVector m_vecPos;
public:
- static CProjectileInfo* GetProjectileInfo(int32 id);
- static CProjectile* (&ms_apProjectile)[NUM_PROJECTILES];
+ static CProjectileInfo *GetProjectileInfo(int32 id);
+ static CProjectile *ms_apProjectile[NUM_PROJECTILES];
static void Initialise();
static void Shutdown();
@@ -29,4 +29,4 @@ public:
static bool IsProjectileInRange(float x1, float x2, float y1, float y2, float z1, float z2, bool remove);
};
-extern CProjectileInfo (&gaProjectileInfo)[NUM_PROJECTILES]; \ No newline at end of file
+extern CProjectileInfo gaProjectileInfo[NUM_PROJECTILES]; \ No newline at end of file
diff --git a/src/render/WeaponEffects.cpp b/src/weapons/WeaponEffects.cpp
index 2ed9e662..2ed9e662 100644
--- a/src/render/WeaponEffects.cpp
+++ b/src/weapons/WeaponEffects.cpp
diff --git a/src/render/WeaponEffects.h b/src/weapons/WeaponEffects.h
index 31c5a309..31c5a309 100644
--- a/src/render/WeaponEffects.h
+++ b/src/weapons/WeaponEffects.h