Skip to content

Commit 725ba29

Browse files
qweasdd136963q4a
authored andcommitted
Game objects testing functions replaced with game object casting (e.g. 'bool is_car' -> 'CCar* cast_Car')
1 parent c0e260c commit 725ba29

File tree

4 files changed

+64
-412
lines changed

4 files changed

+64
-412
lines changed

src/Common/Config.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
/* Scripts */
1717
#define MORE_INVENTORY_SLOTS // Adds 5 more slots CUSTOM_SLOT_1..5
1818
#define GAME_OBJECT_EXTENDED_EXPORTS // see: script_game_object*.cpp/h
19-
#define GAME_OBJECT_TESTING_EXPORTS // see: script_game_object4.cpp functions for object testing (ie. is_stalker(), is_heli())
19+
#define GAME_OBJECT_CASTING_EXPORTS // see: script_game_object4.cpp functions for object casting (ie. cast_Car(), cast_Heli())
2020
#define NAMESPACE_LEVEL_EXPORTS // see: level_script.cpp
2121

2222
/* Visual */

src/xrGame/script_game_object.h

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -787,49 +787,6 @@ class CScriptGameObject
787787
void unlock_door_for_npc();
788788
bool is_door_blocked_by_npc() const;
789789
bool is_weapon_going_to_be_strapped(CScriptGameObject const* object) const;
790-
791-
//AVO: functions for object testing
792-
#ifdef GAME_OBJECT_TESTING_EXPORTS
793-
//bool isGameObject() const;
794-
//bool isCar() const;
795-
//bool isHeli() const;
796-
//bool isHolderCustom() const;
797-
bool isEntityAlive() const;
798-
bool isInventoryItem() const;
799-
bool isInventoryOwner() const;
800-
bool isActor() const;
801-
bool isCustomMonster() const;
802-
bool isWeapon() const;
803-
//bool isMedkit() const;
804-
//bool isEatableItem() const;
805-
//bool isAntirad() const;
806-
bool isCustomOutfit() const;
807-
bool isScope() const;
808-
bool isSilencer() const;
809-
bool isGrenadeLauncher() const;
810-
bool isWeaponMagazined() const;
811-
bool isSpaceRestrictor() const;
812-
bool isStalker() const;
813-
bool isAnomaly() const;
814-
bool isMonster() const;
815-
//bool isExplosive() const;
816-
//bool isScriptZone() const;
817-
//bool isProjector() const;
818-
bool isTrader() const;
819-
bool isHudItem() const;
820-
//bool isFoodItem() const;
821-
bool isArtefact() const;
822-
bool isAmmo() const;
823-
//bool isMissile() const;
824-
//bool isPhysicsShellHolder() const;
825-
//bool isGrenade() const;
826-
//bool isBottleItem() const;
827-
//bool isTorch() const;
828-
bool isWeaponGL() const;
829-
bool isInventoryBox() const;
830-
831-
#endif // GAME_OBJECT_TESTING_EXPORTS
832-
//-AVO
833790

834791
#ifdef GAME_OBJECT_EXTENDED_EXPORTS
835792
void SetHealthEx(float hp); //AVO

0 commit comments

Comments
 (0)