make bodyque procedurally and increase maximum to 16
This commit is contained in:
parent
6857946b1a
commit
de8dfa48a6
|
@ -273,6 +273,8 @@ void(entity e) setspawnparms = #78;
|
||||||
|
|
||||||
const vector VEC_ORIGIN = '0 0 0';
|
const vector VEC_ORIGIN = '0 0 0';
|
||||||
|
|
||||||
|
const float BODYQUE_MAX = 16;
|
||||||
|
|
||||||
const string WEPNAME_AXE = "Axe";
|
const string WEPNAME_AXE = "Axe";
|
||||||
const string WEPNAME_SHOTGUN = "Shotgun";
|
const string WEPNAME_SHOTGUN = "Shotgun";
|
||||||
const string WEPNAME_SUPER_SHOTGUN = "Double-barrelled Shotgun";
|
const string WEPNAME_SUPER_SHOTGUN = "Double-barrelled Shotgun";
|
||||||
|
|
|
@ -197,18 +197,30 @@ void() bodyque = {
|
||||||
// creates bodyques
|
// creates bodyques
|
||||||
};
|
};
|
||||||
|
|
||||||
void() InitBodyQue = {
|
entity() spawn_bodyque = {
|
||||||
entity e;
|
entity e;
|
||||||
|
|
||||||
bodyque_head = spawn();
|
e = spawn();
|
||||||
bodyque_head.classname = "bodyque";
|
e.classname = "bodyque";
|
||||||
bodyque_head.owner = spawn();
|
|
||||||
bodyque_head.owner.classname = "bodyque";
|
return e;
|
||||||
bodyque_head.owner.owner = spawn();
|
};
|
||||||
bodyque_head.owner.owner.classname = "bodyque";
|
|
||||||
bodyque_head.owner.owner.owner = spawn();
|
void() InitBodyQue = {
|
||||||
bodyque_head.owner.owner.owner.classname = "bodyque";
|
entity e;
|
||||||
bodyque_head.owner.owner.owner.owner = bodyque_head;
|
float i;
|
||||||
|
|
||||||
|
for(i = 0; i < BODYQUE_MAX; i++) {
|
||||||
|
if(i == 0) {
|
||||||
|
bodyque_head = spawn_bodyque();
|
||||||
|
e = bodyque_head;
|
||||||
|
} else {
|
||||||
|
e.owner = spawn_bodyque();
|
||||||
|
e = e.owner;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
e.owner = bodyque_head;
|
||||||
};
|
};
|
||||||
|
|
||||||
// make a body que entry for the given ent so the ent can be
|
// make a body que entry for the given ent so the ent can be
|
||||||
|
|
Loading…
Reference in New Issue
Block a user