- Updateed for HydrogenHosting.org
- Added the ability to change fog colours
- Changed TickFogDensity to TickFog
- Changed music system to operate per client (in the event something... happens...)
- Added index for planned dynamic gamemode system
- Version bump
This commit is contained in:
2025-04-20 05:00:16 -04:00
parent 43a3db3ed2
commit 12791ba6a3
4 changed files with 32 additions and 8 deletions

View File

@@ -2,7 +2,7 @@
* *
* A FEW THINGS TO KNOW: ONE.... THIS IS INTENDED TO BE USED WITH UBERUPGRADES. * A FEW THINGS TO KNOW: ONE.... THIS IS INTENDED TO BE USED WITH UBERUPGRADES.
* TWO..... THE MUSIC USED WITH THIS MOD MAY OR MAY NOT BE COPYRIGHTED. WE HAVE NO INTENTION ON INFRINGEMENT. THIS PROJECT IS PURELY NON PROFIT AND JUST FOR FUN. SHOULD COPYRIGHT HOLDERS WISH THIS PROJECT BE TAKEN DOWN, I (Fartsy) SHALL OBLIGE WITHOUT HESITATION. * TWO..... THE MUSIC USED WITH THIS MOD MAY OR MAY NOT BE COPYRIGHTED. WE HAVE NO INTENTION ON INFRINGEMENT. THIS PROJECT IS PURELY NON PROFIT AND JUST FOR FUN. SHOULD COPYRIGHT HOLDERS WISH THIS PROJECT BE TAKEN DOWN, I (Fartsy) SHALL OBLIGE WITHOUT HESITATION.
* THREE..... THIS MOD IS INTENDED FOR USE ON THE FIREHOSTREDUX SERVERS ONLY. SUPPORT IS LIMITED. * THREE..... THIS MOD IS INTENDED FOR USE ON THE HYDROGENHOSTING SERVERS ONLY. EXPECT LIMITED SUPPORT.
* FOUR..... THIS WAS A NIGHTMARE TO FIGURE OUT AND BUG FIX. I HOPE IT WAS WORTH IT. * FOUR..... THIS WAS A NIGHTMARE TO FIGURE OUT AND BUG FIX. I HOPE IT WAS WORTH IT.
* FIVE..... PLEASE HAVE FUN AND ENJOY YOURSELF! * FIVE..... PLEASE HAVE FUN AND ENJOY YOURSELF!
* SIX..... THE DURATION OF MUSIC TIMERS SHOULD BE SET DEPENDING WHAT SONG IS USED. SET THIS USING THE CONFIG FILES. SONG DUR IN SECONDS / 0.0151515151515 = REFIRE TIME. * SIX..... THE DURATION OF MUSIC TIMERS SHOULD BE SET DEPENDING WHAT SONG IS USED. SET THIS USING THE CONFIG FILES. SONG DUR IN SECONDS / 0.0151515151515 = REFIRE TIME.
@@ -27,7 +27,6 @@
#pragma newdecls required #pragma newdecls required
#pragma semicolon 1 #pragma semicolon 1
public Database Get_Ass_Database(){ public Database Get_Ass_Database(){
return Ass_Database; return Ass_Database;
} }
@@ -37,7 +36,7 @@ public Plugin myinfo = {
author = "Fartsy", author = "Fartsy",
description = "Framework for Fartsy's Ass (MvM Mods)", description = "Framework for Fartsy's Ass (MvM Mods)",
version = PLUGIN_VERSION, version = PLUGIN_VERSION,
url = "https://forums.firehostredux.com" url = "https://wiki.hydrogenhosting.org"
}; };
public void OnPluginStart() { public void OnPluginStart() {
@@ -92,5 +91,5 @@ public void OnGameFrame() {
if(WeatherManager.TornadoWarning) WeatherManager.TickSiren(); if(WeatherManager.TornadoWarning) WeatherManager.TickSiren();
if (AudioManager.shouldTick) AudioManager.TickBGM(); if (AudioManager.shouldTick) AudioManager.TickBGM();
if (BossHandler.shouldTick) BossHandler.Tick(); if (BossHandler.shouldTick) BossHandler.Tick();
WeatherManager.TickFogDensity(); WeatherManager.TickFog();
} }

View File

@@ -91,7 +91,11 @@ enum struct AUDIOMANAGER {
strcopy(this.songName, sizeof(this.songName), BGMArray[this.indexBGM].songName); strcopy(this.songName, sizeof(this.songName), BGMArray[this.indexBGM].songName);
this.refireBGM = BGMArray[this.indexBGM].refireTime; this.refireBGM = BGMArray[this.indexBGM].refireTime;
this.ticksBGM = (this.tickBGMOffset ? BGMArray[this.indexBGM].ticksOffset : 0); this.ticksBGM = (this.tickBGMOffset ? BGMArray[this.indexBGM].ticksOffset : 0);
CustomSoundEmitter(BGMArray[this.indexBGM].realPath, BGMArray[this.indexBGM].SNDLVL, true, 1, 1.0, 100); for (int i = 0; i < MaxClients; i++){
//if(tacobell && isClientInEvent(i)) return;// To test if client is experiencing anything odd.....
CSEClient(i, BGMArray[this.indexBGM].realPath, BGMArray[this.indexBGM].SNDLVL, true, 1, 1.0, 100);
}
//CustomSoundEmitter(BGMArray[this.indexBGM].realPath, BGMArray[this.indexBGM].SNDLVL, true, 1, 1.0, 100);
CreateTimer(1.0, SyncMusic, this.indexBGM); CreateTimer(1.0, SyncMusic, this.indexBGM);
} }
} }
@@ -271,6 +275,12 @@ enum struct WEATHERMANAGER {
float sirenPitch; float sirenPitch;
float sirenPitchRate; float sirenPitchRate;
float sirenPitchTarget; float sirenPitchTarget;
int fogColorR;
int fogColorG;
int fogColorB;
int fogColorRTarget;
int fogColorGTarget;
int fogColorBTarget;
int intensity; int intensity;
int mIntensity; int mIntensity;
void Activate(){ void Activate(){
@@ -580,13 +590,27 @@ enum struct WEATHERMANAGER {
void StartFogTransition(){ void StartFogTransition(){
FastFire2("Weather.FogOutdoor", "StartFogTransition", "", 0.0, false); FastFire2("Weather.FogOutdoor", "StartFogTransition", "", 0.0, false);
} }
void TickFogDensity(){ void TickFog(){
if(this.fogDensity != this.fogTarget){ if(this.fogDensity != this.fogTarget){
char targetDensity[24]; char targetDensity[24];
this.fogDensity = (this.fogDensity < this.fogTarget) ? FloatMin(this.fogDensity+=this.fogChangeRate, this.fogTarget) : FloatMax(this.fogDensity-=this.fogChangeRate, this.fogTarget); this.fogDensity = (this.fogDensity < this.fogTarget) ? FloatMin(this.fogDensity+=this.fogChangeRate, this.fogTarget) : FloatMax(this.fogDensity-=this.fogChangeRate, this.fogTarget);
FloatToString(this.fogDensity, targetDensity, sizeof(targetDensity)); FloatToString(this.fogDensity, targetDensity, sizeof(targetDensity));
FastFire2("Weather.FogOutdoor", "SetMaxDensity", targetDensity, 0.0, false); FastFire2("Weather.FogOutdoor", "SetMaxDensity", targetDensity, 0.0, false);
} }
if(this.fogColorR != this.fogColorRTarget || this.fogColorG != this.fogColorGTarget || this.fogColorB != this.fogColorBTarget){
char target[15];
char targetR[3];
char targetG[3];
char targetB[3];
this.fogColorR = (this.fogColorR < this.fogColorRTarget) ? FloatMin(this.fogColorR+=this.fogChangeRate, this.fogColorRTarget) : FloatMax(this.fogColorR-=this.fogChangeRate, this.fogColorRTarget);
this.fogColorG = (this.fogColorG < this.fogColorGTarget) ? FloatMin(this.fogColorG+=this.fogChangeRate, this.fogColorGTarget) : FloatMax(this.fogColorG-=this.fogChangeRate, this.fogColorGTarget);
this.fogColorB = (this.fogColorB < this.fogColorBTarget) ? FloatMin(this.fogColorB+=this.fogChangeRate, this.fogColorBTarget) : FloatMax(this.fogColorB-=this.fogChangeRate, this.fogColorBTarget);
IntToString(this.fogColorR, targetR, sizeof(targetR));
IntToString(this.fogColorG, targetG, sizeof(targetG));
IntToString(this.fogColorB, targetB, sizeof(targetB));
Format(target, sizeof(target), "%i %i %i", targetR, targetG, targetB);
FastFire2("Weather.FogOutdoor", "SetColor", target, 0.0, false);
}
} }
void TickSiren(){ void TickSiren(){
if(this.TornadoWarning){ if(this.TornadoWarning){

View File

@@ -76,6 +76,7 @@ enum struct COREDATA {
int CodeEntry; int CodeEntry;
int curWave; int curWave;
int failsafeCount; int failsafeCount;
int gamemode;
int lastAdmin; int lastAdmin;
int refireTime; int refireTime;
int sacPoints; int sacPoints;
@@ -410,7 +411,7 @@ BULKFIRE crusaderAtk[64];
//Configure all variables //Configure all variables
void SetupCoreData(){ void SetupCoreData(){
AssLogger(LOGLVL_INFO, "Setting up core data..."); AssLogger(LOGLVL_INFO, "Setting up core data...");
ass[0].name = "[10] Kissone Bath Salts"; ass[0].name = "[10] Bath Salts";
ass[1].name = "[20] Summon Goobbue or Kirby"; ass[1].name = "[20] Summon Goobbue or Kirby";
ass[2].name = "[30] Robot Trap (Wave Fail-safe)"; ass[2].name = "[30] Robot Trap (Wave Fail-safe)";
ass[3].name = "[40] Explosives Paradise"; ass[3].name = "[40] Explosives Paradise";

View File

@@ -1,4 +1,4 @@
public char PLUGIN_VERSION[8] = "8.0.0"; public char PLUGIN_VERSION[8] = "8.1.0a";
void sudo(int task) { void sudo(int task) {
AssLogger(LOGLVL_DEBUG, "Calling sudo with %i", task); AssLogger(LOGLVL_DEBUG, "Calling sudo with %i", task);
switch (task) { switch (task) {