Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fixes a warning for cam2-5s by not including a directory that does not exist. - Audio is started from rules.js rather than the weather scripts. - Rocky maps use the Kevlar scavenger texture. - Weather used in multiplay. Qtscript: Adds function setCampaignNumber(number). Fixes ticket:983. Music resets in eventGameInit in rules.js.
- Loading branch information
Showing
66 changed files
with
295 additions
and
567 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
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,51 @@ | ||
//Controls weather conditions like rain/snow. Fog stuff goes here. | ||
var loaded; //don't execute stuff in eventGameInit more than once | ||
|
||
function wDefined(x) | ||
{ | ||
return typeof(x) !== "undefined"; | ||
} | ||
|
||
//Allows up to max - 1 to be generated. | ||
function wRandom(max) | ||
{ | ||
return Math.floor(Math.random() * max); | ||
} | ||
|
||
function eventGameInit() | ||
{ | ||
if (wDefined(loaded) && loaded) | ||
{ | ||
return; | ||
} | ||
|
||
loaded = true; | ||
if (tilesetType === "URBAN" || tilesetType === "ROCKIES") | ||
{ | ||
weatherCycle(); | ||
setTimer("weatherCycle", 45000); | ||
} | ||
else | ||
{ | ||
setWeather(WEATHER_CLEAR); | ||
} | ||
} | ||
|
||
function weatherCycle() | ||
{ | ||
if (wRandom(100) > 33) | ||
{ | ||
if (tilesetType === "URBAN") | ||
{ | ||
setWeather(WEATHER_RAIN); | ||
} | ||
else if (tilesetType === "ROCKIES") | ||
{ | ||
setWeather(WEATHER_SNOW); | ||
} | ||
} | ||
else | ||
{ | ||
setWeather(WEATHER_CLEAR); //stop weather effect | ||
} | ||
} |
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
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
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.