mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 14:37:29 +08:00
[saco] Implement/match CActorPed::ApplyAnimation(...)
This commit is contained in:
parent
61497a1372
commit
4a3df886e2
@ -66,6 +66,32 @@ void CActorPed::Destroy()
|
|||||||
|
|
||||||
//-----------------------------------------------------------
|
//-----------------------------------------------------------
|
||||||
|
|
||||||
|
void CActorPed::ApplyAnimation( char *szAnimName, char *szAnimFile, float fT,
|
||||||
|
int opt1, int opt2, int opt3, int opt4, int iUnk )
|
||||||
|
{
|
||||||
|
int iWaitAnimLoad=0;
|
||||||
|
|
||||||
|
if(!m_pPed) return;
|
||||||
|
if(!GamePool_Ped_GetAt(m_dwGTAId)) return;
|
||||||
|
|
||||||
|
// Can't allow 'naughty' anims!
|
||||||
|
if( !stricmp(szAnimFile,"SEX") )
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!pGame->IsAnimationLoaded(szAnimFile)) {
|
||||||
|
pGame->RequestAnimation(szAnimFile);
|
||||||
|
while(!pGame->IsAnimationLoaded(szAnimFile)) {
|
||||||
|
Sleep(1);
|
||||||
|
iWaitAnimLoad++;
|
||||||
|
if(iWaitAnimLoad == 15) return; // we can't wait forever
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ScriptCommand(&apply_animation,m_dwGTAId,szAnimName,szAnimFile,fT,opt1,opt2,opt3,opt4,iUnk);
|
||||||
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------
|
||||||
|
|
||||||
DWORD dwActorPed=0;
|
DWORD dwActorPed=0;
|
||||||
|
|
||||||
BOOL __declspec(naked) FlushPedIntelligence()
|
BOOL __declspec(naked) FlushPedIntelligence()
|
||||||
|
@ -15,9 +15,12 @@ public:
|
|||||||
|
|
||||||
void SetTargetRotation(float fRotation);
|
void SetTargetRotation(float fRotation);
|
||||||
float GetHealth();
|
float GetHealth();
|
||||||
|
void SetHealth(float fHealth);
|
||||||
float GetArmour();
|
float GetArmour();
|
||||||
void SetArmour(float fArmour);
|
void SetArmour(float fArmour);
|
||||||
|
|
||||||
|
void ApplyAnimation(char *szAnimName, char *szAnimFile, float fT,
|
||||||
|
int opt1, int opt2, int opt3, int opt4, int iUnk);
|
||||||
void ClearAnimations();
|
void ClearAnimations();
|
||||||
|
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ const SCRIPT_COMMAND set_actor_animation_set = { 0x0245, "is" };
|
|||||||
const SCRIPT_COMMAND request_animation = { 0x04ED, "s" };
|
const SCRIPT_COMMAND request_animation = { 0x04ED, "s" };
|
||||||
const SCRIPT_COMMAND is_animation_loaded = { 0x04EE, "s" };
|
const SCRIPT_COMMAND is_animation_loaded = { 0x04EE, "s" };
|
||||||
const SCRIPT_COMMAND release_animation = { 0x04EF, "s" };
|
const SCRIPT_COMMAND release_animation = { 0x04EF, "s" };
|
||||||
|
const SCRIPT_COMMAND apply_animation = { 0x0812, "issfiiiii" }; // actor,animation,library,floatunk,bool,bool,bool,bool,int
|
||||||
const SCRIPT_COMMAND set_actor_weapon_droppable = { 0x087e, "ii" };
|
const SCRIPT_COMMAND set_actor_weapon_droppable = { 0x087e, "ii" };
|
||||||
const SCRIPT_COMMAND set_actor_money = { 0x03fe, "ii" };
|
const SCRIPT_COMMAND set_actor_money = { 0x03fe, "ii" };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user