From e7d38a42694a3dbae9da06e2f3770b5c38af268a Mon Sep 17 00:00:00 2001 From: Laura Date: Sun, 22 Sep 2024 15:47:55 +0200 Subject: [PATCH] add named parameters and correct types for some natives --- ENTITY/CreateModelSwap.md | 4 +-- ENTITY/IsEntityAtEntity.md | 8 +++--- ENTITY/PlayEntityAnim.md | 19 +++++--------- ENTITY/PlaySynchronizedEntityAnim.md | 14 ++++------ ENTITY/PlaySynchronizedMapEntityAnim.md | 26 +++++++++---------- ENTITY/RemoveModelSwap.md | 4 +-- PED/SetPedToRagdoll.md | 12 ++++----- PED/SetPedToRagdollWithFall.md | 34 +++++++++++++++++-------- 8 files changed, 62 insertions(+), 59 deletions(-) diff --git a/ENTITY/CreateModelSwap.md b/ENTITY/CreateModelSwap.md index 5cb3b7c27..b020ff85b 100644 --- a/ENTITY/CreateModelSwap.md +++ b/ENTITY/CreateModelSwap.md @@ -5,7 +5,7 @@ ns: ENTITY ```c // 0x92C47782FDA8B2A3 0x0BC12F9E -void CREATE_MODEL_SWAP(float x, float y, float z, float radius, Hash originalModel, Hash newModel, BOOL p6); +void CREATE_MODEL_SWAP(float x, float y, float z, float radius, Hash originalModel, Hash newModel, BOOL bSurviveMapReload); ``` ``` @@ -20,5 +20,5 @@ Network players do not see changes done with this. * **radius**: * **originalModel**: * **newModel**: -* **p6**: +* **bSurviveMapReload**: diff --git a/ENTITY/IsEntityAtEntity.md b/ENTITY/IsEntityAtEntity.md index df3ddf3ea..d9ed8a200 100644 --- a/ENTITY/IsEntityAtEntity.md +++ b/ENTITY/IsEntityAtEntity.md @@ -5,7 +5,7 @@ ns: ENTITY ```c // 0x751B70C3D034E187 0xDABDCB52 -BOOL IS_ENTITY_AT_ENTITY(Entity entity1, Entity entity2, float xSize, float ySize, float zSize, BOOL p5, BOOL p6, int p7); +BOOL IS_ENTITY_AT_ENTITY(Entity entity1, Entity entity2, float xSize, float ySize, float zSize, BOOL highlightArea, BOOL do3dCheck, int transportMode); ``` ``` @@ -19,8 +19,8 @@ Last three parameters are almost alwasy p5 = 0, p6 = 1, p7 = 0 * **xSize**: * **ySize**: * **zSize**: -* **p5**: -* **p6**: -* **p7**: +* **highlightArea**: +* **do3dCheck**: +* **transportMode**: ## Return value diff --git a/ENTITY/PlayEntityAnim.md b/ENTITY/PlayEntityAnim.md index 335b5645d..412258d18 100644 --- a/ENTITY/PlayEntityAnim.md +++ b/ENTITY/PlayEntityAnim.md @@ -5,12 +5,7 @@ ns: ENTITY ```c // 0x7FB218262B810701 0x878753D5 -BOOL PLAY_ENTITY_ANIM(Entity entity, char* animName, char* animDict, float p3, BOOL loop, BOOL stayInAnim, BOOL p6, float delta, Any bitset); -``` - -``` -delta and bitset are guessed fields. They are based on the fact that most of the calls have 0 or nil field types passed in. -The only time bitset has a value is 0x4000 and the only time delta has a value is during stealth with usually <1.0f values. +BOOL PLAY_ENTITY_ANIM(Entity entity, char* animName, char* animDict, float fBlendDelta, BOOL bLoop, BOOL bHoldLastFrame, BOOL bDriveToPose, float fStartPhase, cs_type(Any) int nFlags); ``` [Animations list](https://alexguirre.github.io/animations-list/) @@ -19,11 +14,11 @@ The only time bitset has a value is 0x4000 and the only time delta has a value i * **entity**: * **animName**: * **animDict**: -* **p3**: -* **loop**: -* **stayInAnim**: -* **p6**: -* **delta**: -* **bitset**: +* **fBlendDelta**: +* **bLoop**: +* **bHoldLastFrame**: +* **bDriveToPose**: unused +* **fStartPhase**: +* **nFlags**: ## Return value diff --git a/ENTITY/PlaySynchronizedEntityAnim.md b/ENTITY/PlaySynchronizedEntityAnim.md index 3fd2a95ae..39b55996c 100644 --- a/ENTITY/PlaySynchronizedEntityAnim.md +++ b/ENTITY/PlaySynchronizedEntityAnim.md @@ -5,11 +5,7 @@ ns: ENTITY ```c // 0xC77720A12FE14A86 0x012760AA -BOOL PLAY_SYNCHRONIZED_ENTITY_ANIM(Entity entity, int syncedScene, char* animation, char* propName, float p4, float p5, Any p6, float p7); -``` - -``` -p4 and p7 are usually 1000.0f. +BOOL PLAY_SYNCHRONIZED_ENTITY_ANIM(Entity entity, int syncedScene, char* animation, char* propName, float fBlendInDelta, float fBlendOutDelta, cs_type(Any) int iFlags, float fMoverBlendInDelta); ``` [Animations list](https://alexguirre.github.io/animations-list/) @@ -19,9 +15,9 @@ p4 and p7 are usually 1000.0f. * **syncedScene**: * **animation**: * **propName**: -* **p4**: -* **p5**: -* **p6**: -* **p7**: +* **fBlendInDelta**: +* **fBlendOutDelta**: +* **iFlags**: +* **fMoverBlendInDelta**: ## Return value diff --git a/ENTITY/PlaySynchronizedMapEntityAnim.md b/ENTITY/PlaySynchronizedMapEntityAnim.md index c56dcc33a..8fe89b365 100644 --- a/ENTITY/PlaySynchronizedMapEntityAnim.md +++ b/ENTITY/PlaySynchronizedMapEntityAnim.md @@ -5,23 +5,23 @@ ns: ENTITY ```c // 0xB9C54555ED30FBC4 0xEB4CBA74 -BOOL PLAY_SYNCHRONIZED_MAP_ENTITY_ANIM(float p0, float p1, float p2, float p3, Any p4, Any p5, Any* p6, Any* p7, float p8, float p9, Any p10, float p11); +BOOL PLAY_SYNCHRONIZED_MAP_ENTITY_ANIM(float x, float y, float z, float radius, cs_type(Any) int modelHash, cs_type(Any) int sceneId, cs_type(Any*) char* pAnimName, cs_type(Any*) char* pAnimDictName, float fBlendDelta, float fBlendOutDelta, cs_type(Any) int flags, float fMoverBlendInDelta); ``` [Animations list](https://alexguirre.github.io/animations-list/) ## Parameters -* **p0**: -* **p1**: -* **p2**: -* **p3**: -* **p4**: -* **p5**: -* **p6**: -* **p7**: -* **p8**: -* **p9**: -* **p10**: -* **p11**: +* **x**: +* **y**: +* **z**: +* **radius**: +* **modelHash**: +* **sceneId**: +* **pAnimName**: +* **pAnimDictName**: +* **fBlendDelta**: +* **fBlendOutDelta**: +* **flags**: +* **fMoverBlendInDelta**: ## Return value diff --git a/ENTITY/RemoveModelSwap.md b/ENTITY/RemoveModelSwap.md index 97d930014..c58414a82 100644 --- a/ENTITY/RemoveModelSwap.md +++ b/ENTITY/RemoveModelSwap.md @@ -5,7 +5,7 @@ ns: ENTITY ```c // 0x033C0F9A64E229AE 0xCE0AA8BC -void REMOVE_MODEL_SWAP(float x, float y, float z, float radius, Hash originalModel, Hash newModel, BOOL p6); +void REMOVE_MODEL_SWAP(float x, float y, float z, float radius, Hash originalModel, Hash newModel, BOOL bLazy); ``` @@ -16,5 +16,5 @@ void REMOVE_MODEL_SWAP(float x, float y, float z, float radius, Hash originalMod * **radius**: * **originalModel**: * **newModel**: -* **p6**: +* **bLazy**: diff --git a/PED/SetPedToRagdoll.md b/PED/SetPedToRagdoll.md index c2dede288..02e5ec682 100644 --- a/PED/SetPedToRagdoll.md +++ b/PED/SetPedToRagdoll.md @@ -5,7 +5,7 @@ ns: PED ```c // 0xAE99FB955581844A 0x83CB5052 -BOOL SET_PED_TO_RAGDOLL(Ped ped, int time1, int time2, int ragdollType, BOOL p4, BOOL p5, BOOL p6); +BOOL SET_PED_TO_RAGDOLL(Ped ped, int minTime, int maxTime, int ragdollType, BOOL bAbortIfInjured, BOOL bAbortIfDead, BOOL bForceScriptControl); ``` p4/p5: Unusued in TU27 @@ -17,11 +17,11 @@ p4/p5: Unusued in TU27 ## Parameters * **ped**: -* **time1**: Time(ms) Ped is in ragdoll mode; only applies to ragdoll types 0 and not 1. -* **time2**: +* **minTime**: Time(ms) Ped is in ragdoll mode; only applies to ragdoll types 0 and not 1. +* **maxTime**: * **ragdollType**: -* **p4**: -* **p5**: -* **p6**: +* **bAbortIfInjured**: unused +* **bAbortIfDead**: unused +* **bForceScriptControl**: ## Return value diff --git a/PED/SetPedToRagdollWithFall.md b/PED/SetPedToRagdollWithFall.md index fd752797c..f7ee11409 100644 --- a/PED/SetPedToRagdollWithFall.md +++ b/PED/SetPedToRagdollWithFall.md @@ -5,7 +5,19 @@ ns: PED ```c // 0xD76632D99E4966C8 0xFA12E286 -BOOL SET_PED_TO_RAGDOLL_WITH_FALL(Ped ped, int time, int p2, int ragdollType, float x, float y, float z, float p7, float p8, float p9, float p10, float p11, float p12, float p13); +BOOL SET_PED_TO_RAGDOLL_WITH_FALL(Ped ped, int minTime, int maxTime, int nFallType, float x, float y, float z, float fGroundHeight, float grab1X, float grab1Y, float grab1Z, float grab2X, float grab2Y, float grab2Z); +``` + +```cpp +enum eNMFallType { + TYPE_FROM_HIGH = 0, + TYPE_OVER_WALL = 1, + TYPE_DOWN_STAIRS = 2, + TYPE_DIE_TYPES = 3, + TYPE_DIE_FROM_HIGH = 4, + TYPE_DIE_OVER_WALL = 5, + TYPE_DIE_DOWN_STAIRS = 6 +} ``` ``` @@ -20,18 +32,18 @@ ped::set_ped_to_ragdoll_with_fall(ped, 1500, 2000, 1, -entity::get_entity_forwar ## Parameters * **ped**: -* **time**: -* **p2**: -* **ragdollType**: +* **minTime**: +* **maxTime**: +* **nFallType**: * **x**: * **y**: * **z**: -* **p7**: -* **p8**: -* **p9**: -* **p10**: -* **p11**: -* **p12**: -* **p13**: +* **fGroundHeight**: +* **grab1X**: +* **grab1Y**: +* **grab1Z**: +* **grab2X**: +* **grab2Y**: +* **grab2Z**: ## Return value