multitheftauto / mtasa-blue

Multi Theft Auto is a game engine that incorporates an extendable network play element into a proprietary commercial single-player game.
https://multitheftauto.com
GNU General Public License v3.0
1.42k stars 438 forks source link

New function: testSphereAgainstWorld #646

Open CrosRoad95 opened 6 years ago

CrosRoad95 commented 6 years ago

Is your feature request related to a problem? Please describe. Nothing to describe, simillar to processLineOfSight but instead of a line, it tests the sphere This could be helpful for fancy scripts.

Describe the solution you'd like /

Describe alternatives you've considered /

Additional context int __cdecl CWorld::TestSphereAgainstWorld(CVector sphereCenter, float sphereRadius, CEntity *ignoreEntity, char buildings, char vehicles, char peds, char objects, char dummies, char doIgnoreCameraCheck)

offset 0x00569E20

Pirulax commented 4 years ago

seems interesting, wonder why it wasnt added in the first place? Anyways, heres the corrected prototype:

int __cdecl CWorld__TestSphereAgainstWorld(CVector sphereCenter, float sphereRadius, CEntity *ignoreEntity, bool buildings, bool vehicles, bool peds, bool objects, bool dummies, bool doIgnoreCameraCheck)

Also, seems like this function is like isLineOfSightClear(not processLineOfSight). It doesnt return any info about where it hit or anything.

Proxy-99 commented 1 month ago

3787