vantage point uses dummyent
This commit is contained in:
+1
-1
@@ -444,7 +444,7 @@ const __entexp_ctf-flag [ result "angle: %1\nteam: %2" ]
|
||||
const __entexp_sound [ concatword "config slot: #%1\nradius: %2\nsize: %3\nvolume: %4\n\n\fs\f1slot #%1 info:\n" (format2 "\f9%1\fr\nmaxuses: %2" (editmapsoundslot (getentattr 0)))]
|
||||
const __entexp_clip [ result "elevation: %1\nx-radius: %2\ny-radius: %3\nheight: %4\nslope: %6\nshape: %7" ]
|
||||
const __entexp_plclip __entexp_clip
|
||||
const __entexp_dummy [ result "n/a" ]
|
||||
const __entexp_dummy [ if (= (getentattr 1) 222) [ result "The Vantage Point" ] [ result "n/a" ] ]
|
||||
|
||||
const explainclosestentity [
|
||||
if (>= (getclosestent) 0) [
|
||||
|
||||
+5
-4
@@ -20,6 +20,7 @@ extern short entwraparound[MAXENTTYPES][7];
|
||||
extern uchar entscale[MAXENTTYPES][7];
|
||||
#define ENTSCALE10 10
|
||||
#define ENTSCALE5 5
|
||||
#define VANTAGEDUMMY2 222
|
||||
|
||||
enum {MAP_IS_BAD, MAP_IS_EDITABLE, MAP_IS_GOOD};
|
||||
|
||||
@@ -537,10 +538,10 @@ public:
|
||||
|
||||
void selectweapon(int w, bool other = false)
|
||||
{
|
||||
if(weaponsel) prevweaponsel = weaponsel;
|
||||
weaponsel = weapons[(gunselect = w)];
|
||||
if(!prevweaponsel) prevweaponsel = weaponsel;
|
||||
if(other && (prevweaponsel != weaponsel)) weaponswitch(weaponsel, true);
|
||||
if(weaponsel) prevweaponsel = weaponsel;
|
||||
weaponsel = weapons[(gunselect = w)];
|
||||
if(!prevweaponsel) prevweaponsel = weaponsel;
|
||||
if(other && (prevweaponsel != weaponsel)) weaponswitch(weaponsel, true);
|
||||
}
|
||||
|
||||
void setprimary(int w) { primweap = weapons[(primary = w)]; }
|
||||
|
||||
@@ -1106,6 +1106,20 @@ int load_world(char *mname) // still supports all map formats that have e
|
||||
parseheaderextra();
|
||||
popscontext();
|
||||
|
||||
short p[5];
|
||||
if(getvantagepoint(p))
|
||||
{
|
||||
entity &e = ents.add();
|
||||
e.type = DUMMYENT;
|
||||
e.x = float(p[0])/DMF;
|
||||
e.y = float(p[1])/DMF;
|
||||
e.z = float(p[2])/DMF;
|
||||
e.attr1 = p[3];
|
||||
e.attr2 = VANTAGEDUMMY2;
|
||||
e.attr5 = p[4];
|
||||
e.spawned = false;
|
||||
}
|
||||
|
||||
c2skeepalive();
|
||||
|
||||
watch.start();
|
||||
|
||||
Reference in New Issue
Block a user