summaryrefslogtreecommitdiffstats
path: root/src/weapons/BulletInfo.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-04-15 16:36:38 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-04-15 16:36:38 +0200
commit1d8484ed7dca21681d2ad08ba605d4d197d2b99f (patch)
tree9e0ba3dec35f0137f4973c4dcca12828a8a23da9 /src/weapons/BulletInfo.cpp
parentMerge branch 'master' into garages_dev (diff)
downloadre3-1d8484ed7dca21681d2ad08ba605d4d197d2b99f.tar
re3-1d8484ed7dca21681d2ad08ba605d4d197d2b99f.tar.gz
re3-1d8484ed7dca21681d2ad08ba605d4d197d2b99f.tar.bz2
re3-1d8484ed7dca21681d2ad08ba605d4d197d2b99f.tar.lz
re3-1d8484ed7dca21681d2ad08ba605d4d197d2b99f.tar.xz
re3-1d8484ed7dca21681d2ad08ba605d4d197d2b99f.tar.zst
re3-1d8484ed7dca21681d2ad08ba605d4d197d2b99f.zip
Diffstat (limited to 'src/weapons/BulletInfo.cpp')
-rw-r--r--src/weapons/BulletInfo.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/weapons/BulletInfo.cpp b/src/weapons/BulletInfo.cpp
index cb9e0b2d..177a99d1 100644
--- a/src/weapons/BulletInfo.cpp
+++ b/src/weapons/BulletInfo.cpp
@@ -70,6 +70,7 @@ bool CBulletInfo::AddBullet(CEntity* pSource, eWeaponType type, CVector vecPosit
gaBulletInfo[i].m_vecSpeed = vecSpeed;
gaBulletInfo[i].m_fTimer = CTimer::GetTimeInMilliseconds() + BULLET_LIFETIME;
gaBulletInfo[i].m_bInUse = true;
+ return true;
}
void CBulletInfo::Update(void)
@@ -138,7 +139,7 @@ void CBulletInfo::Update(void)
else if (pHitEntity->IsVehicle()) {
CVehicle* pVehicle = (CVehicle*)pHitEntity;
pVehicle->InflictDamage(pBullet->m_pSource, pBullet->m_eWeaponType, pBullet->m_nDamage);
- if (pBullet->m_eWeaponType == WEAPONTYPE_FLAMETHROWER) // how?
+ if (pBullet->m_eWeaponType == WEAPONTYPE_FLAMETHROWER) // huh?
gFireManager.StartFire(pVehicle, pBullet->m_pSource, 0.8f, true);
else {
for (int j = 0; j < NUM_VEHICLE_SPARKS; j++)
@@ -266,3 +267,10 @@ bool CBulletInfo::TestForSniperBullet(float x1, float x2, float y1, float y2, fl
return minP <= maxP;
#endif
}
+
+STARTPATCHES
+ InjectHook(0x558220, &CBulletInfo::Initialise, PATCH_JUMP);
+ InjectHook(0x558450, &CBulletInfo::Shutdown, PATCH_JUMP);
+ InjectHook(0x558470, &CBulletInfo::AddBullet, PATCH_JUMP);
+ InjectHook(0x558550, &CBulletInfo::Update, PATCH_JUMP);
+ENDPATCHES \ No newline at end of file