forked from multitheftauto/mtasa-blue
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lua API for buildings (multitheftauto#3274)
* createBuilding * Fix collision issue * Remove unused changes * Fix buildings API * Fix custom models and setElementModel * Fix build * Small fixes * Fix some edge cases * Fix from review * Fix optional value * Fix dynamic model spawn * Fix function name * review fixes * Fix getElementModel function for buildings * Fix buildings leak * Add get rotation and set rotation functions for buildings * fix setElementModel * Fix rotation * Add position checks * fix * fix IsValidPosition --------- Co-authored-by: TEDERIs <[email protected]>
- Loading branch information
1 parent
1b40db7
commit 81242ed
Showing
32 changed files
with
739 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/***************************************************************************** | ||
* | ||
* PROJECT: Multi Theft Auto v1.0 | ||
* LICENSE: See LICENSE in the top level directory | ||
* FILE: game_sa/CBuildingSA.cpp | ||
* PURPOSE: Building entity | ||
* | ||
* Multi Theft Auto is available from http://www.multitheftauto.com/ | ||
* | ||
*****************************************************************************/ | ||
|
||
#include "StdInc.h" | ||
#include "CBuildingSA.h" | ||
|
||
CBuildingSA::CBuildingSA(CBuildingSAInterface* pInterface) | ||
{ | ||
SetInterface(pInterface); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/***************************************************************************** | ||
* | ||
* PROJECT: Multi Theft Auto v1.0 | ||
* LICENSE: See LICENSE in the top level directory | ||
* FILE: game_sa/CBuildingSA.h | ||
* PURPOSE: Header file for game building class | ||
* | ||
* Multi Theft Auto is available from http://www.multitheftauto.com/ | ||
* | ||
*****************************************************************************/ | ||
|
||
#pragma once | ||
|
||
#include <game/CBuilding.h> | ||
#include "CEntitySA.h" | ||
|
||
class CBuildingSAInterface : public CEntitySAInterface | ||
{ | ||
}; | ||
static_assert(sizeof(CBuildingSAInterface) == 0x38, "Invalid size CBuildingSAInterface"); | ||
|
||
class CBuildingSA final : public virtual CBuilding, public virtual CEntitySA | ||
{ | ||
public: | ||
CBuildingSA(CBuildingSAInterface* pInterface); | ||
|
||
CBuildingSAInterface* GetBuildingInterface() { return reinterpret_cast<CBuildingSAInterface*>(GetInterface()); }; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.