Guest User

Untitled

a guest
Sep 14th, 2022
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.88 KB | None | 0 0
  1. diff --git a/src/core/Cam.cpp b/src/core/Cam.cpp
  2. index 72e8ad93..84abffc6 100644
  3. --- a/src/core/Cam.cpp
  4. +++ b/src/core/Cam.cpp
  5. @@ -944,7 +944,7 @@ CCam::Using3rdPersonMouseCam(void)
  6. #ifdef FIRST_PERSON
  7. return CCamera::m_bUseMouse3rdPerson && (Mode == MODE_FOLLOWPED || Mode == MODE_REAL_1ST_PERSON);
  8. #else
  9. - return CCamera::m_bUseMouse3rdPerson && Mode == MODE_FOLLOWPED);
  10. + return CCamera::m_bUseMouse3rdPerson && Mode == MODE_FOLLOWPED;
  11. #endif
  12. }
  13.  
  14. diff --git a/src/core/FileLoader.cpp b/src/core/FileLoader.cpp
  15. index d8d328d9..7c9fa15d 100644
  16. --- a/src/core/FileLoader.cpp
  17. +++ b/src/core/FileLoader.cpp
  18. @@ -587,7 +587,7 @@ CFileLoader::AddTexDictionaries(RwTexDictionary *dst, RwTexDictionary *src)
  19.  
  20. #define isLine3(l, a, b, c) ((l[0] == a) && (l[1] == b) && (l[2] == c))
  21. #define isLine4(l, a, b, c, d) ((l[0] == a) && (l[1] == b) && (l[2] == c) && (l[3] == d))
  22. -
  23. +#define isLine6(l, a, b, c, d, e, f) ((l[0] == a) && (l[1] == b) && (l[2] == c) && (l[3] == d) && (l[4] == e) && (l[5] == f))
  24. void
  25. CFileLoader::LoadObjectTypes(const char *filename)
  26. {
  27. @@ -1151,7 +1151,7 @@ CFileLoader::LoadScene(const char *filename)
  28. else if(isLine4(line, 'p','a','t','h')) section = PATH;
  29. else if(isLine4(line, 'o','c','c','l')) section = OCCL;
  30. #ifdef WANTED_PATHS
  31. - else if (isLine4(line, 'w', 'a', 'n', 't', 'e', 'd')) section = WANTED;
  32. + else if (isLine6(line, 'w', 'a', 'n', 't', 'e', 'd')) section = WANTED;
  33. #endif
  34. }else if(isLine3(line, 'e','n','d')){
  35. section = NONE;
  36. diff --git a/src/core/Wanted.cpp b/src/core/Wanted.cpp
  37. index 0da632bb..7094dcf0 100644
  38. --- a/src/core/Wanted.cpp
  39. +++ b/src/core/Wanted.cpp
  40. @@ -471,19 +471,21 @@ CWanted::WorkOutPolicePresence(CVector posn, float radius)
  41.  
  42. CEntity* hitEntity;
  43. if (FindPlayerPed()->bIsDucking) {
  44. - CWorld::ProcessLineOfSight(copHeadPos, playerHeadPos, CColPoint{}, hitEntity, true, true, false, false, false, true, true, true);
  45. + CColPoint ccolpoint{};
  46. + CWorld::ProcessLineOfSight(copHeadPos, playerHeadPos, ccolpoint, hitEntity, true, true, false, false, false, true, true, true);
  47. } else {
  48. bool bCheckVehicles = false;
  49. if (!FindPlayerVehicle()) {
  50. CEntity* hitEntity2;
  51. - if (CWorld::ProcessLineOfSight(copHeadPos, playerHeadPos, CColPoint{}, hitEntity2, true, true, false, false, false, true, true, true)) {
  52. + CColPoint ccolpoint{};
  53. + if (CWorld::ProcessLineOfSight(copHeadPos, playerHeadPos, ccolpoint, hitEntity2, true, true, false, false, false, true, true, true)) {
  54. CVehicle* hitVehicle = (CVehicle*)hitEntity2;
  55. if (hitVehicle && hitVehicle->IsHighVehicle())
  56. bCheckVehicles = true;
  57. }
  58. }
  59. -
  60. - CWorld::ProcessLineOfSight(copHeadPos, playerHeadPos, CColPoint{}, hitEntity, true, bCheckVehicles, false, false, false, true, true, true);
  61. + CColPoint ccolpoint{};
  62. + CWorld::ProcessLineOfSight(copHeadPos, playerHeadPos, ccolpoint, hitEntity, true, bCheckVehicles, false, false, false, true, true, true);
  63. }
  64.  
  65. bool isCopSeesPlayer = angleOfSight < -0.25f && !hitEntity;
  66. @@ -544,19 +546,21 @@ CWanted::WorkOutPolicePresence(CVector posn, float radius)
  67.  
  68. CEntity* hitEntity;
  69. if (FindPlayerPed()->bIsDucking) {
  70. - CWorld::ProcessLineOfSight(vehicle->GetPosition() + CVector(0.0f, 0.0f, 0.75f), playerHeadPos, CColPoint{}, hitEntity, true, true, false, false, false, true, true, true);
  71. + CColPoint ccolpoint{};
  72. + CWorld::ProcessLineOfSight(vehicle->GetPosition() + CVector(0.0f, 0.0f, 0.75f), playerHeadPos, ccolpoint, hitEntity, true, true, false, false, false, true, true, true);
  73. } else {
  74. bool bCheckVehicles = false;
  75. if (!FindPlayerVehicle()) {
  76. CEntity* hitEntity2;
  77. - if (CWorld::ProcessLineOfSight(vehicle->GetPosition() + CVector(0.0f, 0.0f, 0.75f), playerHeadPos, CColPoint{}, hitEntity2, true, true, false, false, false, true, true, true)) {
  78. + CColPoint ccolpoint{};
  79. + if (CWorld::ProcessLineOfSight(vehicle->GetPosition() + CVector(0.0f, 0.0f, 0.75f), playerHeadPos, ccolpoint, hitEntity2, true, true, false, false, false, true, true, true)) {
  80. CVehicle* hitVehicle = (CVehicle*)hitEntity2;
  81. if (hitVehicle && hitVehicle->IsHighVehicle())
  82. bCheckVehicles = true;
  83. }
  84. }
  85. -
  86. - CWorld::ProcessLineOfSight(vehicle->GetPosition() + CVector(0.0f, 0.0f, 0.75f), playerHeadPos, CColPoint{}, hitEntity, true, bCheckVehicles, false, false, false, true, true, true);
  87. + CColPoint ccolpoint{};
  88. + CWorld::ProcessLineOfSight(vehicle->GetPosition() + CVector(0.0f, 0.0f, 0.75f), playerHeadPos, ccolpoint, hitEntity, true, bCheckVehicles, false, false, false, true, true, true);
  89. }
  90. #ifdef DEBUG
  91. if (!hitEntity && !wanted->IsPlayerHides())
  92. diff --git a/src/core/config.h b/src/core/config.h
  93. index 758728ba..d1bd8fe3 100644
  94. --- a/src/core/config.h
  95. +++ b/src/core/config.h
  96. @@ -391,9 +391,9 @@ enum Config {
  97. //# define PS2_MENU_USEALLPAGEICONS
  98. #else
  99. # define MAP_ENHANCEMENTS // Adding waypoint and better mouse support
  100. -# if defined(XINPUT) || defined(GTA_HANDHELD)
  101. +//# if defined(XINPUT) || defined(GTA_HANDHELD)
  102. # define GAMEPAD_MENU // Add gamepad menu
  103. -# endif
  104. +//# endif
  105. //# define TRIANGLE_BACK_BUTTON
  106. # define CIRCLE_BACK_BUTTON
  107. #define LEGACY_MENU_OPTIONS // i.e. frame sync(vsync)
  108. diff --git a/src/peds/CopPed.cpp b/src/peds/CopPed.cpp
  109. index c905a56e..bac24700 100644
  110. --- a/src/peds/CopPed.cpp
  111. +++ b/src/peds/CopPed.cpp
  112. @@ -408,7 +408,7 @@ CCopPed::CopAI(void)
  113.  
  114. if (m_bThrowingTeargas) {
  115. eWeaponType weapon = GetWeapon()->m_eWeaponType;
  116. - CWeaponInfo::GetWeaponInfo(weapon)->m_nWeaponSlot == WEAPONSLOT_PROJECTILE ? SetAttack(nil) : m_bThrowingTeargas = false;
  117. + if (CWeaponInfo::GetWeaponInfo(weapon)->m_nWeaponSlot == WEAPONSLOT_PROJECTILE) { SetAttack(nil); } else { m_bThrowingTeargas = false; }
  118. }
  119. #endif
  120.  
  121. diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
  122. index 130c8f2a..d9e9c55d 100644
  123. --- a/src/peds/Ped.cpp
  124. +++ b/src/peds/Ped.cpp
  125. @@ -2044,25 +2044,25 @@ CPed::ProcessControl(void)
  126. }
  127. }
  128.  
  129. - CVector ñurrentPedPosition = GetPosition();
  130. + CVector currentPedPosition = GetPosition();
  131. CVector distance;
  132. float speed;
  133. if (bIsClimbingHighJump || bIsClimbingIdle) {
  134. speed = highClimbingOffsetSpeed;
  135. - distance = newClimbingIdlePosition - ñurrentPedPosition;
  136. + distance = newClimbingIdlePosition - currentPedPosition;
  137. }
  138. else if (bIsClimbingPull) {
  139. speed = 1.3f;
  140. CVector newPedClimbingPullPosition = correctedClimbingStandPosition + CVector(0.0f, 0.0f, 0.5f);
  141. - distance = newPedClimbingPullPosition - ñurrentPedPosition;
  142. + distance = newPedClimbingPullPosition - currentPedPosition;
  143. }
  144. else if (bIsClimbingJumpB) {
  145. speed = 0.75f;
  146. - distance = newClimbingJumpBPosition - ñurrentPedPosition;
  147. + distance = newClimbingJumpBPosition - currentPedPosition;
  148. }
  149. else if (!bIsClimbingIdle) {
  150. speed = 1.5f;
  151. - distance = newClimbingPosition - ñurrentPedPosition;
  152. + distance = newClimbingPosition - currentPedPosition;
  153. }
  154.  
  155. float distanceMagnitude = distance.Magnitude();
  156. @@ -2077,7 +2077,7 @@ CPed::ProcessControl(void)
  157. }
  158.  
  159. CVector deltaNormal = distance / distanceMagnitude;
  160. - SetPosition(ñurrentPedPosition + deltaNormal * deltaSpeed);
  161. + SetPosition(currentPedPosition + deltaNormal * deltaSpeed);
  162. }
  163. else if (bIsClimbingIdle) {
  164. bUsesCollision = 1;
  165. @@ -10351,8 +10351,8 @@ bool CPed::CheckObjectFrontPlayer(CColPoint& hitForwardPoint)
  166. bool CPed::CheckObjectAbovePlayer(CColPoint& hitForwardPoint)
  167. {
  168. CEntity* hitEntity;
  169. -
  170. - bool isObjectAbovePlayer = CWorld::ProcessLineOfSight(GetPosition(), GetPosition() + CVector(0.0f, 0.0f, 2.75f), CColPoint{}, hitEntity, true, false, false, true, false, false);
  171. + //CColPoint ccolpoint {};
  172. + bool isObjectAbovePlayer = CWorld::ProcessLineOfSight(GetPosition(), GetPosition() + CVector(0.0f, 0.0f, 2.75f), hitForwardPoint, hitEntity, true, false, false, true, false, false);
  173.  
  174. CEntity* hitObjectAbovePlayer1 = CWorld::TestSphereAgainstWorld(GetPosition() + CVector(0.0f, 0.0f, 1.0f), 0.25f, this, true, true, true, true, false, false);
  175. CEntity* hitObjectAbovePlayer2 = CWorld::TestSphereAgainstWorld(GetPosition() + CVector(0.0f, 0.0f, 1.25f), 0.25f, this, true, true, true, true, false, false);
  176. diff --git a/src/peds/PedAI.cpp b/src/peds/PedAI.cpp
  177. index bf30e99c..5f581254 100644
  178. --- a/src/peds/PedAI.cpp
  179. +++ b/src/peds/PedAI.cpp
  180. @@ -6657,7 +6657,8 @@ CPed::KillCharOnFootArmed(CVector &ourPos, CVector &targetPos, CVector &distWith
  181.  
  182. #ifdef IMPROVED_TECH_PART // AI
  183. CEntity* hitEntity;
  184. - bool obstacle = CWorld::ProcessLineOfSight(m_pedInObjective->GetPosition(), GetPosition(), CColPoint{}, hitEntity, true, true, false, true, false, true);
  185. + CColPoint ccolpoint{};
  186. + bool obstacle = CWorld::ProcessLineOfSight(m_pedInObjective->GetPosition(), GetPosition(), ccolpoint, hitEntity, true, true, false, true, false, true);
  187.  
  188. CVehicle* hitVehicle = (CVehicle*)hitEntity;
  189. bool bShootIsDangerous = hitVehicle && hitVehicle->IsHighVehicle();
  190. diff --git a/src/peds/PlayerPed.cpp b/src/peds/PlayerPed.cpp
  191. index bf1ca60c..258cb41e 100644
  192. --- a/src/peds/PlayerPed.cpp
  193. +++ b/src/peds/PlayerPed.cpp
  194. @@ -1795,7 +1795,8 @@ CPlayerPed::ProcessPlayerWeapon(CPad *padUsed)
  195. // first check
  196. CWorld::pIgnoreEntity = this;
  197. CEntity* hitEntityRaycast;
  198. - if (CWorld::ProcessLineOfSight(TheCamera.GetPosition(), TheCamera.GetPosition() + TheCamera.GetForward() * 20.0f, CColPoint{}, hitEntityRaycast, true, false, true, false, false, true)) {
  199. + CColPoint ccolpoint{};
  200. + if (CWorld::ProcessLineOfSight(TheCamera.GetPosition(), TheCamera.GetPosition() + TheCamera.GetForward() * 20.0f, ccolpoint, hitEntityRaycast, true, false, true, false, false, true)) {
  201. if (hitEntityRaycast->IsPed()) {
  202. CPed* hitPed = (CPed*)hitEntityRaycast;
  203. if ((hitPed->CanSeeEntity(this, DEGTORAD(80.0f)) && hitPed->m_nPedType != PEDTYPE_COP) ||
  204.  
Advertisement
Add Comment
Please, Sign In to add comment