From 79d50cb3d494f4951e98eaed3435c690201d681e Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Wed, 14 Aug 2024 23:17:01 +0800 Subject: [PATCH] [saco] Implement/match `CGame::RequestAnimationsAndModels()` --- saco/game/game.cpp | 43 +++++++++++++++++++++++++++++++++++++++++++ saco/game/game.h | 1 + 2 files changed, 44 insertions(+) diff --git a/saco/game/game.cpp b/saco/game/game.cpp index a71700d..9cccc0b 100644 --- a/saco/game/game.cpp +++ b/saco/game/game.cpp @@ -1051,3 +1051,46 @@ int CGame::GetRwObjectsCount() //----------------------------------------------------------- +void CGame::RequestAnimationsAndModels() +{ + if(!IsAnimationLoaded("PARACHUTE")) + RequestAnimation( "PARACHUTE"); + if(!IsAnimationLoaded("BAR")) + RequestAnimation( "BAR"); + if(!IsAnimationLoaded("GANGS")) + RequestAnimation( "GANGS"); + if(!IsAnimationLoaded("PAULNMAC")) + RequestAnimation( "PAULNMAC"); + if(!IsAnimationLoaded("VENDING")) + RequestAnimation( "VENDING"); + if(!IsAnimationLoaded("FIGHT_B")) + RequestAnimation( "FIGHT_B"); + if(!IsAnimationLoaded("FIGHT_C")) + RequestAnimation( "FIGHT_C"); + if(!IsAnimationLoaded("FIGHT_D")) + RequestAnimation( "FIGHT_D"); + if(!IsAnimationLoaded("FIGHT_E")) + RequestAnimation( "FIGHT_E"); + + if (!IsModelLoaded(OBJECT_PARACHUTE)) + RequestModel(OBJECT_PARACHUTE); + if (!IsModelLoaded(1485)) // cigar + RequestModel(1485); + if (!IsModelLoaded(1486)) // beer bottle + RequestModel(1486); + if (!IsModelLoaded(1543)) // beer bottle + RequestModel(1543); + if (!IsModelLoaded(1546)) // sprunk cup + RequestModel(1546); + if (!IsModelLoaded(WEAPON_MODEL_TEARGAS)) + RequestModel(WEAPON_MODEL_TEARGAS); + if (!IsModelLoaded(WEAPON_MODEL_GRENADE)) + RequestModel(WEAPON_MODEL_GRENADE); + if (!IsModelLoaded(WEAPON_MODEL_MOLTOV)) + RequestModel(WEAPON_MODEL_MOLTOV); + if (!IsModelLoaded(330)) // cellphone + RequestModel(330); +} + +//----------------------------------------------------------- + diff --git a/saco/game/game.h b/saco/game/game.h index 01d4d44..c2d4049 100644 --- a/saco/game/game.h +++ b/saco/game/game.h @@ -132,6 +132,7 @@ public: void SetTimeInMilliseconds(DWORD dwTimeInMs); DWORD GetTimeInMilliseconds(); int GetRwObjectsCount(); + void RequestAnimationsAndModels(); }; //-----------------------------------------------------------