Soviets will now have paratroopers at the start of soviet mission 1, modified lua GiveSpecialWeapon and super code to allow perputual usage of script granted super weapons even if the prereq requirements aren't met.

This commit is contained in:
Justin Marshall
2020-07-20 11:27:06 -07:00
parent e721d781e5
commit 9fcc2d286d
6 changed files with 17 additions and 5 deletions
+4 -2
View File
@@ -70,6 +70,7 @@ SuperClass::SuperClass(int recharge, bool powered, VoxType charging, VoxType rea
IsPresent(false),
IsOneTime(false),
IsReady(false),
IsNoPreq(false),
Control(0),
OldStage(-1),
VoxRecharge(ready),
@@ -139,11 +140,12 @@ bool SuperClass::Suspend(bool on)
* HISTORY: *
* 07/28/1995 JLB : Created. *
*=============================================================================================*/
bool SuperClass::Enable(bool onetime, bool player, bool quiet)
bool SuperClass::Enable(bool onetime, bool player, bool quiet, bool skipPreReq)
{
if (!IsPresent) {
IsPresent = true;
IsOneTime = onetime;
IsNoPreq = skipPreReq;
bool retval = Recharge(player && !quiet);
if (quiet) Suspend(true);
return(retval);
@@ -170,7 +172,7 @@ bool SuperClass::Enable(bool onetime, bool player, bool quiet)
*=============================================================================================*/
bool SuperClass::Remove(void)
{
if (IsPresent && !IsOneTime) {
if (IsPresent && !IsOneTime && !IsNoPreq) {
IsReady = false;
IsPresent = false;
return(true);