From ddb2440aab1a028dbbdfb0b8189fc887db821f91 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Sun, 5 May 2024 18:19:43 +0800 Subject: [PATCH] [saco] Implement and match `ReplaceBuildingModel(...)` --- saco/game/util.cpp | 8 ++++++++ saco/game/util.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/saco/game/util.cpp b/saco/game/util.cpp index 7ec60b6..8d71679 100644 --- a/saco/game/util.cpp +++ b/saco/game/util.cpp @@ -1189,6 +1189,14 @@ OBJECT_TYPE * GamePool_GetObject() //----------------------------------------------------------- +void ReplaceBuildingModel(ENTITY_TYPE *pEntity, int iModelID) +{ + _asm push iModelID + _asm mov ecx, pEntity + _asm mov edx, 0x403EC0 + _asm call edx +} + //----------------------------------------------------------- // Translate Weapon model ID into actual weapon ID. diff --git a/saco/game/util.h b/saco/game/util.h index 049d56a..20d37e7 100644 --- a/saco/game/util.h +++ b/saco/game/util.h @@ -39,3 +39,5 @@ BUILDING_TYPE * GamePool_GetBuilding(); DUMMY_TYPE * GamePool_GetDummy(); OBJECT_TYPE * GamePool_GetObject(); +void ReplaceBuildingModel(ENTITY_TYPE *pEntity, int iModelID); +