mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-08 07:53:20 +00:00
Minor HS fixes
This commit is contained in:
parent
09fe247134
commit
24ca8e73cc
4 changed files with 16 additions and 40 deletions
|
@ -312,6 +312,7 @@ public Action OnClientSayCommand(int client, const char[] command, const char[]
|
||||||
|
|
||||||
|
|
||||||
public Action Command_Join(int client, int args) {
|
public Action Command_Join(int client, int args) {
|
||||||
|
if(!isEnabled) return Plugin_Continue;
|
||||||
static float tpLoc[3];
|
static float tpLoc[3];
|
||||||
GetSpawnPosition(tpLoc);
|
GetSpawnPosition(tpLoc);
|
||||||
if(args == 1) {
|
if(args == 1) {
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
#include <hideandseek/hsgame>
|
#include <hideandseek/hsgame>
|
||||||
#include <hideandseek/hscmds>
|
|
||||||
#include <hideandseek/hsents>
|
#include <hideandseek/hsents>
|
||||||
|
#include <hideandseek/hscmds>
|
||||||
|
|
||||||
static KeyValues kv;
|
static KeyValues kv;
|
||||||
StringMap mapConfigs;
|
StringMap mapConfigs;
|
||||||
|
|
||||||
|
static float DEFAULT_SCALE[3] = { 5.0, 5.0, 5.0 };
|
||||||
|
|
||||||
bool ReloadMapDB() {
|
bool ReloadMapDB() {
|
||||||
if(kv != null) {
|
if(kv != null) {
|
||||||
delete kv;
|
delete kv;
|
||||||
|
|
|
@ -309,3 +309,4 @@ stock void GetViewVector(float fVecAngle[3], float fOutPut[3])
|
||||||
bool Filter_IgnoreAll(int entity, int mask) {
|
bool Filter_IgnoreAll(int entity, int mask) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,10 +12,10 @@
|
||||||
#include <sdktools>
|
#include <sdktools>
|
||||||
#include <left4dhooks>
|
#include <left4dhooks>
|
||||||
#include <sceneprocessor>
|
#include <sceneprocessor>
|
||||||
|
#include <basegamemode>
|
||||||
#include <multicolors>
|
#include <multicolors>
|
||||||
#if defined DEBUG_BLOCKERS
|
#if defined DEBUG_BLOCKERS
|
||||||
#include <smlib/effects>
|
#include <smlib/effects>
|
||||||
int g_iLaserIndex;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
public Plugin myinfo =
|
public Plugin myinfo =
|
||||||
|
@ -60,53 +60,17 @@ enum GameState {
|
||||||
State_Hunting
|
State_Hunting
|
||||||
}
|
}
|
||||||
|
|
||||||
char gamemode[32], currentMap[64];
|
|
||||||
bool isEnabled, lateLoaded;
|
|
||||||
|
|
||||||
bool isPendingPlay[MAXPLAYERS+1];
|
|
||||||
bool isNavBlockersEnabled = true, isPropsEnabled = true, isPortalsEnabled = true;
|
|
||||||
bool isNearbyPlaying[MAXPLAYERS+1];
|
bool isNearbyPlaying[MAXPLAYERS+1];
|
||||||
bool wasThirdPersonVomitted[MAXPLAYERS+1];
|
bool wasThirdPersonVomitted[MAXPLAYERS+1];
|
||||||
bool gameOver;
|
bool gameOver;
|
||||||
int currentSeeker;
|
int currentSeeker;
|
||||||
int currentPlayers = 0;
|
int currentPlayers = 0;
|
||||||
|
|
||||||
float DEFAULT_SCALE[3] = { 5.0, 5.0, 5.0 };
|
|
||||||
|
|
||||||
char currentSet[16] = "default";
|
|
||||||
|
|
||||||
Handle suspenseTimer, thirdPersonTimer;
|
Handle suspenseTimer, thirdPersonTimer;
|
||||||
|
|
||||||
char nextRoundMap[64];
|
|
||||||
int seekerCam = INVALID_ENT_REFERENCE;
|
|
||||||
bool isViewingCam[MAXPLAYERS+1];
|
|
||||||
|
|
||||||
int g_BeamSprite;
|
int g_BeamSprite;
|
||||||
int g_HaloSprite;
|
int g_HaloSprite;
|
||||||
|
|
||||||
enum struct EntityConfig {
|
|
||||||
float origin[3];
|
|
||||||
float rotation[3];
|
|
||||||
char type[32];
|
|
||||||
char model[64];
|
|
||||||
float scale[3];
|
|
||||||
float offset[3];
|
|
||||||
}
|
|
||||||
|
|
||||||
enum struct MapConfig {
|
|
||||||
ArrayList entities;
|
|
||||||
ArrayList inputs;
|
|
||||||
float spawnpoint[3];
|
|
||||||
bool hasSpawnpoint;
|
|
||||||
int mapTime;
|
|
||||||
bool canClimb;
|
|
||||||
bool pressButtons;
|
|
||||||
}
|
|
||||||
|
|
||||||
MapConfig mapConfig;
|
|
||||||
ArrayList validMaps;
|
|
||||||
ArrayList validSets;
|
|
||||||
|
|
||||||
bool hasBeenSeeker[MAXPLAYERS+1];
|
bool hasBeenSeeker[MAXPLAYERS+1];
|
||||||
bool ignoreSeekerBalance;
|
bool ignoreSeekerBalance;
|
||||||
|
|
||||||
|
@ -244,6 +208,14 @@ public Action L4D2_OnChangeFinaleStage(int &finaleType, const char[] arg) {
|
||||||
return Plugin_Continue;
|
return Plugin_Continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void OnSceneStageChanged(int scene, SceneStages stage) {
|
||||||
|
if(isEnabled && stage == SceneStage_Spawned) {
|
||||||
|
int activator = GetSceneInitiator(scene);
|
||||||
|
if(activator != GetActorFromScene(scene)) {
|
||||||
|
CancelScene(scene);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void Event_GamemodeChange(ConVar cvar, const char[] oldValue, const char[] newValue) {
|
public void Event_GamemodeChange(ConVar cvar, const char[] oldValue, const char[] newValue) {
|
||||||
cvar.GetString(gamemode, sizeof(gamemode));
|
cvar.GetString(gamemode, sizeof(gamemode));
|
||||||
|
@ -278,7 +250,7 @@ public void Event_GamemodeChange(ConVar cvar, const char[] oldValue, const char[
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if(!lateLoaded && suspenseTimer != null) {
|
} else if(!lateLoaded) {
|
||||||
UnhookEvent("round_end", Event_RoundEnd);
|
UnhookEvent("round_end", Event_RoundEnd);
|
||||||
UnhookEvent("round_start", Event_RoundStart);
|
UnhookEvent("round_start", Event_RoundStart);
|
||||||
UnhookEvent("item_pickup", Event_ItemPickup);
|
UnhookEvent("item_pickup", Event_ItemPickup);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue