diff --git a/reapi/include/cssdk/dlls/bmodels.h b/reapi/include/cssdk/dlls/bmodels.h index 741ebc6..d6e948b 100644 --- a/reapi/include/cssdk/dlls/bmodels.h +++ b/reapi/include/cssdk/dlls/bmodels.h @@ -27,23 +27,36 @@ */ #pragma once -#define SF_PENDULUM_SWING 2 // spawnflag that makes a pendulum a rope swing. +// func_rotating +#define SF_BRUSH_ROTATE_Y_AXIS 0 +#define SF_BRUSH_ROTATE_INSTANT 1 +#define SF_BRUSH_ROTATE_BACKWARDS 2 +#define SF_BRUSH_ROTATE_Z_AXIS 4 +#define SF_BRUSH_ROTATE_X_AXIS 8 -#define SF_BRUSH_ACCDCC 16 // brush should accelerate and decelerate when toggled -#define SF_BRUSH_HURT 32 // rotating brush that inflicts pain based on rotation speed -#define SF_ROTATING_NOT_SOLID 64 // some special rotating objects are not solid. +#define SF_BRUSH_ACCDCC 16 // brush should accelerate and decelerate when toggled +#define SF_BRUSH_HURT 32 // rotating brush that inflicts pain based on rotation speed -#define SF_WALL_START_OFF 0x0001 +#define SF_ROTATING_NOT_SOLID 64 // some special rotating objects are not solid. -#define SF_CONVEYOR_VISUAL 0x0001 -#define SF_CONVEYOR_NOTSOLID 0x0002 +#define SF_BRUSH_ROTATE_SMALLRADIUS 128 +#define SF_BRUSH_ROTATE_MEDIUMRADIUS 256 +#define SF_BRUSH_ROTATE_LARGERADIUS 512 -#define SF_WORLD_DARK 0x0001 // Fade from black at startup -#define SF_WORLD_TITLE 0x0002 // Display game title at startup -#define SF_WORLD_FORCETEAM 0x0004 // Force teams +#define FANPITCHMIN 30 +#define FANPITCHMAX 100 -#define FANPITCHMIN 30 -#define FANPITCHMAX 100 +// func_pendulum +#define SF_PENDULUM_SWING 2 // spawnflag that makes a pendulum a rope swing. +#define SF_PENDULUM_AUTO_RETURN 16 +#define SF_PENDULUM_PASSABLE 32 + +// func_wall_toggle +#define SF_WALL_START_OFF 0x0001 + +// func_conveyor +#define SF_CONVEYOR_VISUAL 0x0001 +#define SF_CONVEYOR_NOTSOLID 0x0002 // This is just a solid wall if not inhibited class CFuncWall: public CBaseEntity { @@ -95,6 +108,7 @@ public: // basic functions virtual void Spawn() = 0; virtual void Precache() = 0; + virtual void Restart() = 0; virtual void KeyValue(KeyValueData *pkvd) = 0; virtual int Save(CSave &save) = 0; virtual int Restore(CRestore &restore) = 0; @@ -107,6 +121,8 @@ public: float m_flVolume; float m_pitch; int m_sounds; + + Vector m_angles; }; class CPendulum: public CBaseEntity { diff --git a/reapi/include/cssdk/dlls/cbase.h b/reapi/include/cssdk/dlls/cbase.h index d2123fd..53d7f0e 100644 --- a/reapi/include/cssdk/dlls/cbase.h +++ b/reapi/include/cssdk/dlls/cbase.h @@ -338,6 +338,10 @@ public: string_t m_globalstate; }; +#define SF_WORLD_DARK 0x0001 // Fade from black at startup +#define SF_WORLD_TITLE 0x0002 // Display game title at startup +#define SF_WORLD_FORCETEAM 0x0004 // Force teams + // This spawns first when each level begins. class CWorld: public CBaseEntity { public: diff --git a/reapi/include/cssdk/dlls/func_break.h b/reapi/include/cssdk/dlls/func_break.h index c1e9ddb..51099d5 100644 --- a/reapi/include/cssdk/dlls/func_break.h +++ b/reapi/include/cssdk/dlls/func_break.h @@ -105,7 +105,7 @@ public: virtual void KeyValue(KeyValueData *pkvd) = 0; virtual int Save(CSave &save) = 0; virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0 + virtual int ObjectCaps() = 0; virtual BOOL TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType) = 0; virtual void Touch(CBaseEntity *pOther) = 0; virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value) = 0; diff --git a/reapi/include/cssdk/dlls/items.h b/reapi/include/cssdk/dlls/items.h index e485295..07a524e 100644 --- a/reapi/include/cssdk/dlls/items.h +++ b/reapi/include/cssdk/dlls/items.h @@ -31,7 +31,7 @@ enum ItemRestType { ITEM_TYPE_BUYING, // when a player buying items ITEM_TYPE_TOUCHED, // when the player touches with a weaponbox or armoury_entity - ITEM_TYPE_EQUIPPED // when a entity game_player_equip gives item to player or default item's on player spawn + ITEM_TYPE_EQUIPPED // when an entity game_player_equip gives item to player or default item's on player spawn }; // constant items diff --git a/reapi/include/cssdk/dlls/regamedll_interfaces.h b/reapi/include/cssdk/dlls/regamedll_interfaces.h index 38486f6..783cae9 100644 --- a/reapi/include/cssdk/dlls/regamedll_interfaces.h +++ b/reapi/include/cssdk/dlls/regamedll_interfaces.h @@ -95,6 +95,7 @@ public: virtual void Disappear(); virtual void MakeVIP(); virtual bool MakeBomber(); + virtual void StartDeathCam(); CBasePlayer *BasePlayer() const; public: diff --git a/reapi/include/cssdk/dlls/triggers.h b/reapi/include/cssdk/dlls/triggers.h index e71cb1e..576b4c3 100644 --- a/reapi/include/cssdk/dlls/triggers.h +++ b/reapi/include/cssdk/dlls/triggers.h @@ -30,8 +30,12 @@ #define GRENADETYPE_SMOKE 1 #define GRENADETYPE_FLASH 2 +#define SPAWNFLAG_NOMESSAGE 1 +#define SPAWNFLAG_NOTOUCH 1 +#define SPAWNFLAG_DROIDONLY 4 + #define MAX_ITEM_COUNTS 32 -#define MAX_ENTITY 512 // We can only ever move 512 entities across a transition +#define MAX_ENTITY 512 // We can only ever move 512 entities across a transition // triggers #define SF_TRIGGER_ALLOWMONSTERS 1 // monsters allowed to fire this trigger @@ -264,7 +268,9 @@ public: class CTriggerPush: public CBaseTrigger { public: virtual void Spawn() = 0; + virtual void Restart() = 0; virtual void KeyValue(KeyValueData *pkvd) = 0; + virtual int ObjectCaps() = 0; virtual void Touch(CBaseEntity *pOther) = 0; }; diff --git a/reapi/include/cssdk/dlls/util.h b/reapi/include/cssdk/dlls/util.h index ec035a7..91e0b9f 100644 --- a/reapi/include/cssdk/dlls/util.h +++ b/reapi/include/cssdk/dlls/util.h @@ -79,23 +79,6 @@ extern globalvars_t *gpGlobals; #define SVC_ROOMTYPE 37 #define SVC_DIRECTOR 51 -// func_rotating -#define SF_BRUSH_ROTATE_Y_AXIS 0 -#define SF_BRUSH_ROTATE_INSTANT 1 -#define SF_BRUSH_ROTATE_BACKWARDS 2 -#define SF_BRUSH_ROTATE_Z_AXIS 4 -#define SF_BRUSH_ROTATE_X_AXIS 8 -#define SF_PENDULUM_AUTO_RETURN 16 -#define SF_PENDULUM_PASSABLE 32 - -#define SF_BRUSH_ROTATE_SMALLRADIUS 128 -#define SF_BRUSH_ROTATE_MEDIUMRADIUS 256 -#define SF_BRUSH_ROTATE_LARGERADIUS 512 - -#define SPAWNFLAG_NOMESSAGE 1 -#define SPAWNFLAG_NOTOUCH 1 -#define SPAWNFLAG_DROIDONLY 4 - #define VEC_HULL_MIN_Z Vector(0, 0, -36) #define VEC_DUCK_HULL_MIN_Z Vector(0, 0, -18) diff --git a/reapi/include/cssdk/engine/static_map.h b/reapi/include/cssdk/engine/static_map.h index 7138aff..2ec89c7 100644 --- a/reapi/include/cssdk/engine/static_map.h +++ b/reapi/include/cssdk/engine/static_map.h @@ -44,7 +44,7 @@ private: // this was a root node unsigned int rootId = GetRoodNodeId(node->key); if (m_RootNodes[rootId] != node) { - Sys_Error(__FUNCTION__ ": invalid root node"); + Sys_Error("%s: invalid root node", __FUNCTION__); return; } diff --git a/reapi/include/cssdk/game_shared/bot/nav.h b/reapi/include/cssdk/game_shared/bot/nav.h index 65d2721..7f6cf34 100644 --- a/reapi/include/cssdk/game_shared/bot/nav.h +++ b/reapi/include/cssdk/game_shared/bot/nav.h @@ -33,6 +33,15 @@ // to help identify nav files #define NAV_MAGIC_NUMBER 0xFEEDFACE +// version +// 1 = hiding spots as plain vector array +// 2 = hiding spots as HidingSpot objects +// 3 = Encounter spots use HidingSpot ID's instead of storing vector again +// 4 = Includes size of source bsp file to verify nav data correlation +// ---- Beta Release at V4 ----- +// 5 = Added Place info +#define NAV_VERSION 5 + // A place is a named group of navigation areas typedef unsigned int Place; diff --git a/reapi/src/natives/natives_misc.cpp b/reapi/src/natives/natives_misc.cpp index 59d2d03..7e31a9c 100644 --- a/reapi/src/natives/natives_misc.cpp +++ b/reapi/src/natives/natives_misc.cpp @@ -1372,6 +1372,11 @@ cell AMX_NATIVE_CALL rg_set_user_team(AMX *amx, cell *params) } g_amxxapi.SetPlayerTeamInfo(args[arg_index], args[arg_team], GetTeamName(args[arg_team])); + + // If team was changed to spectator, then player should be able immediately to spectate + if (args[arg_team] == SPECTATOR && !pPlayer->IsAlive()) { + pPlayer->CSPlayer()->StartDeathCam(); + } return TRUE; }