PHP:
:getCollisionBetweenPoints
{
0AB1: @getCollisionBetweenPoints 18 from 0@ 1@ 2@ to 3@ 4@ 5@ solid 1 car 1 actor 1 object 1 particle 1 cartyre 1 bikers 0 water 0 DeadPeds 0 see_through 0 camera_objects 0 shoot_through 0 store_to 6@ 7@ 8@ distance_to 9@ entity_to 10@
0A8E: 11@ = 10@ + 0x36 // 10@ Entity struct
0A8D: 11@ = read_memory 11@ size 1 virtual_protect 0 // entity->m_nStatusType
0B10: 12@ = 11@ AND 7 // 12@ - EntityType
EntityType:
ENTITY_TYPE_NOTHING = 0
ENTITY_TYPE_BUILDING = 1
ENTITY_TYPE_VEHICLE = 2
ENTITY_TYPE_PED = 3
ENTITY_TYPE_OBJECT = 4
ENTITY_TYPE_DUMMY = 5
ENTITY_TYPE_NOTINPOOLS = 6
}
IF 00DF: actor $PLAYER_ACTOR in_car
THEN
03C0: 18@ = actor $PLAYER_ACTOR car
IF 18@ > 0
THEN
0A97: 18@ = car 18@ struct
IF 18@ > 0
THEN
0A8C: write_memory 0xB7CD68 size 4 value 18@ virtual_protect 0 // static CEntity *CWorld::pIgnoreEntity
END
END
ELSE
0A96: 18@ = actor $PLAYER_ACTOR struct
IF 18@ > 0
THEN
0A8C: write_memory 0xB7CD68 size 4 value 18@ virtual_protect 0 // static CEntity *CWorld::pIgnoreEntity
END
END
0A8C: write_memory 0xB7CD70 size 1 value 11@ virtual_protect 0 // _CWorld__bIncludeCarTyres
0A8C: write_memory 0xB7CD6F size 1 value 12@ virtual_protect 0 // _CWorld__bIncludeBikers
0A8C: write_memory 0xB7CD71 size 1 value 14@ virtual_protect 0 // _CWorld__bIncludeDeadPeds {$13} {$10-$12}
0AA7: call_function 0x56BA00 num_params 12 pop 12 bIgnoreShootThroughStuff 17@ bIgnoreSomeObjectsForCamera 16@ bIgnoreSeeThroughStuff 15@ bDummy 10@ bObject 9@ bActor 8@ bCar 7@ bBuilding 6@ pEntity 0xA49994 pPoint 0xA49988 pTarget 3@v pOrigin 0@v bReturn 31@ // CWorld__ProcessLineOfSight
0AA5: call_function_no_result 0x5631C0 push 0 pop 0 // _CWorld__ResetLineTestOptions
// 0AD1: "Entity: %x~N~ColPoint: %f %f %f" 1337 $13 $10 $11 $12
IF 13@ <> 0x0
THEN
0A8C: write_memory 0xB7CD68 size 4 value 0x0 virtual_protect 0 // static CEntity *CWorld::pIgnoreEntity
END
IF 31@ <> 0
THEN
IF AND
$10 <> 0.0
$11 <> 0.0
$12 <> 0.0
THEN
050A: 20@ = distance_between_XYZ 0@ 1@ 2@ and_XYZ $10 $11 $12
IF 13@ == 1 // Water
THEN { $14-$16 }
0AA7: call_function 0x6E61B0 num_params 7 pop 7 pPoint 0xA49998 fTargetZ 5@ fTargetY 4@ fTargetX 3@ fOriginZ 2@ fOriginY 1@ fOriginX 0@ bResult 31@ // CWorld__TestLineAgainstWater
IF 31@ <> 0
THEN
0087: $10 = $14
0087: $11 = $15
0087: $12 = $16
050A: 20@ = distance_between_XYZ 0@ 1@ 2@ and_XYZ $14 $15 $16
END
END
0AB2: ret 5 XYZ $10 $11 $12 Dist 20@ Entity $13
END
END
0AB2: ret 5 XYZ 3@ 4@ 5@ Dist 0.0 Entity 0x0
Last edited: