Permalink
Browse files

Attempt to prevent fpath warning in cam2-1x.js.

Do not regroup the southeast cyborg group and make them patrol the original coordinates.

Revert commit 0878031 for the time being.
  • Loading branch information...
KJeff01 committed Sep 7, 2017
1 parent 0878031 commit f96be7129e3526ad7dffa40881dacf19618097d6
@@ -75,10 +75,9 @@ function setupCyborgGroups()
camMakePos ("cybEastPatrol1"),
camMakePos ("cybEastPatrol2"),
camMakePos ("cybEastPatrol3"),
camMakePos ("cybEastPatrol4"),
],
interval: 15000,
regroup: true
interval: 20000,
regroup: false
});
}
@@ -2,10 +2,9 @@
"position_0": { "label": "startingPosition", "pos" : [ 960, 7488 ]},
"position_1": { "label": "transporterEntry", "pos" : [ 128, 7040 ]},
"position_2": { "label": "transporterExit", "pos" : [ 1280, 7936 ]},
"position_3": { "label": "cybEastPatrol1", "pos" : [ 7168, 6528 ]},
"position_4": { "label": "cybEastPatrol2", "pos" : [ 6016, 6400 ]},
"position_5": { "label": "cybEastPatrol3", "pos" : [ 6016, 7168 ]},
"position_6": { "label": "cybEastPatrol4", "pos" : [ 7168, 7168 ]},
"position_3": { "label": "cybEastPatrol1", "pos" : [ 5696, 7104 ]},
"position_4": { "label": "cybEastPatrol2", "pos" : [ 7104, 7104 ]},
"position_5": { "label": "cybEastPatrol3", "pos" : [ 7232, 3904 ]},
"area_0" : { "label" : "crashSite", "subscriber": 0, "pos1" : [ 6080, 1088 ], "pos2" : [ 6976, 1856]},
"area_1" : { "label" : "landingZone", "pos1" : [ 768, 7296 ], "pos2" : [ 1024, 7552 ]},
@@ -218,7 +218,6 @@ function eventGameInit()
// Disabled by default
setMiniMap(false);
setDesign(false);
revealMap(false);
// This is the only template that should be enabled before design is allowed
enableTemplate("ConstructionDroid");
@@ -228,13 +227,6 @@ function eventGameInit()
// Simulate build events to enable minimap/unit design when an HQ exists
eventStructureBuilt(structlist[i]);
}
var structlist = enumStruct(selectedPlayer, SAT_UPLINK);
for (var i = 0; i < structlist.length; i++)
{
// Simulate build events to reveal entire map when a satellite uplink center exists
eventStructureBuilt(structlist[i]);
}
hackNetOn();
setTimer("checkEndConditions", 3000);
@@ -324,33 +316,19 @@ function eventAttacked(victimObj, attackerObj)
function eventStructureBuilt(struct)
{
if (struct.player == selectedPlayer && struct.type == STRUCTURE)
if (struct.player == selectedPlayer && struct.type == STRUCTURE && struct.stattype == HQ)
{
if (struct.stattype == HQ)
{
setMiniMap(true); // show minimap
setDesign(true); // permit designs
}
if (struct.stattype == SAT_UPLINK)
{
revealMap(true); // Reveal the entire map.
}
setMiniMap(true); // show minimap
setDesign(true); // permit designs
}
}
function eventDestroyed(victim)
{
if (victim.player == selectedPlayer && victim.type == STRUCTURE)
if (victim.player == selectedPlayer && victim.type == STRUCTURE && victim.stattype == HQ && !enumStruct(selectedPlayer, HQ).length)
{
if (victim.stattype == HQ && !enumStruct(selectedPlayer, HQ).length)
{
setMiniMap(false); // hide minimap if HQ is destroyed, and no other HQs are present
setDesign(false); // and disallow design
}
if (victim.stattype == SAT_UPLINK && !enumStruct(selectedPlayer, SAT_UPLINK).length)
{
revealMap(false); // Do not reveal the entire map when the player has no satellite uplinks.
}
setMiniMap(false); // hide minimap if HQ is destroyed and no other HQs are present
setDesign(false); // and disallow design
}
}
View
@@ -69,7 +69,6 @@
#include "warcam.h"
#include "projectile.h"
#include "component.h"
#include "visibility.h"
#define FAKE_REF_LASSAT 999
#define ALL_PLAYERS -1
@@ -3019,13 +3018,6 @@ static QScriptValue js_setTutorialMode(QScriptContext *context, QScriptEngine *e
return QScriptValue();
}
//-- \subsection{revealMap(bool)} Enables/disables full visibility of the map.
static QScriptValue js_revealMap(QScriptContext *context, QScriptEngine *engine)
{
seeEverything = context->argument(0).toBool();
return QScriptValue();
}
//-- \subsection{setMiniMap(bool)} Turns visible minimap on or off in the GUI.
static QScriptValue js_setMiniMap(QScriptContext *context, QScriptEngine *engine)
{
@@ -5510,7 +5502,6 @@ bool registerFunctions(QScriptEngine *engine, const QString& scriptName)
engine->globalObject().setProperty("setDesign", engine->newFunction(js_setDesign));
engine->globalObject().setProperty("enableTemplate", engine->newFunction(js_enableTemplate));
engine->globalObject().setProperty("removeTemplate", engine->newFunction(js_removeTemplate));
engine->globalObject().setProperty("revealMap", engine->newFunction(js_revealMap));
engine->globalObject().setProperty("setMiniMap", engine->newFunction(js_setMiniMap));
engine->globalObject().setProperty("setReticuleButton", engine->newFunction(js_setReticuleButton));
engine->globalObject().setProperty("showInterface", engine->newFunction(js_showInterface));
View
@@ -84,7 +84,6 @@ static std::vector<SPOTTER *> apsInvisibleViewers;
static int *gNumWalls = nullptr;
static Vector2i *gWall = nullptr;
bool seeEverything = false;
// forward declarations
static void setSeenBy(BASE_OBJECT *psObj, unsigned viewer, int val);
@@ -605,11 +604,11 @@ static void processVisibilitySelf(BASE_OBJECT *psObj)
setSeenBy(psObj, psObj->player, UBYTE_MAX);
}
// if a player has seeEverything enabled (which would normally happen if the player has a satellite uplink),
// or has godMode enabled (via cheating), they can see everything!
// if a player has a SAT_UPLINK structure, or has godMode enabled,
// they can see everything!
for (unsigned viewer = 0; viewer < MAX_PLAYERS; viewer++)
{
if (viewer == selectedPlayer && (seeEverything || godMode))
if (getSatUplinkExists(viewer) || (viewer == selectedPlayer && godMode))
{
setSeenBy(psObj, viewer, UBYTE_MAX);
}
View
@@ -35,8 +35,6 @@ void visTilesUpdate(BASE_OBJECT *psObj);
void revealAll(UBYTE player);
extern bool seeEverything;
/* Check whether psViewer can see psTarget
* psViewer should be an object that has some form of sensor,
* currently droids and structures.

0 comments on commit f96be71

Please sign in to comment.