mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-22 11:51:11 +00:00
FTE/SERVER: Minor Waypoint cleanup, allow non-solid func_door
This commit is contained in:
parent
4579bd7884
commit
7fb2e98281
3 changed files with 21 additions and 81 deletions
|
@ -862,40 +862,6 @@ void () Waypoint_Functions =
|
||||||
|
|
||||||
void () Waypoint_Logic =
|
void () Waypoint_Logic =
|
||||||
{
|
{
|
||||||
if (!waypoint_mode) {
|
waypoint_mode = true;
|
||||||
waypoint_mode = 1;
|
|
||||||
entity zent;
|
|
||||||
|
|
||||||
zent = find (world, classname, "ai_zombie");
|
|
||||||
while (zent)
|
|
||||||
{
|
|
||||||
remove (zent);
|
|
||||||
zent = find (zent, classname, "ai_zombie");
|
|
||||||
}
|
|
||||||
|
|
||||||
zent = find (world, classname, "door_nzp_cost");
|
|
||||||
while (zent)
|
|
||||||
{
|
|
||||||
zent.solid = SOLID_NOT;
|
|
||||||
zent.touch = SUB_Null;
|
|
||||||
zent = find (zent, classname, "door_nzp_cost");
|
|
||||||
}
|
|
||||||
zent = find (world, classname, "door_nzp");
|
|
||||||
while (zent)
|
|
||||||
{
|
|
||||||
zent.solid = SOLID_NOT;
|
|
||||||
zent.touch = SUB_Null;
|
|
||||||
zent.solid = SOLID_NOT;
|
|
||||||
zent = find (zent, classname, "door_nzp");
|
|
||||||
}
|
|
||||||
zent = find (world, classname, "window");
|
|
||||||
while (zent)
|
|
||||||
{
|
|
||||||
zent.solid = SOLID_NOT;
|
|
||||||
zent.touch = SUB_Null;
|
|
||||||
zent = find (zent, classname, "window");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
Waypoint_Functions();
|
Waypoint_Functions();
|
||||||
};
|
};
|
|
@ -39,6 +39,23 @@ void() main =
|
||||||
|
|
||||||
float ai_delay_time;
|
float ai_delay_time;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Way_SetBrushEntNonSolid(ent_name)
|
||||||
|
// FIXME: Move this elsewhere..
|
||||||
|
// Wrapper for finding brush ents of classname
|
||||||
|
// and making them non-solid. For use only
|
||||||
|
// with Waypoint Mode.
|
||||||
|
//
|
||||||
|
void(string ent_name) Way_SetBrushEntNonSolid =
|
||||||
|
{
|
||||||
|
entity ent = find(world, classname, ent_name);
|
||||||
|
while(ent != world) {
|
||||||
|
ent.solid = SOLID_NOT;
|
||||||
|
ent.touch = SUB_Null;
|
||||||
|
ent = find(ent, classname, ent_name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//called for each frame that QC runs
|
//called for each frame that QC runs
|
||||||
float zombie_cleaned_w;
|
float zombie_cleaned_w;
|
||||||
void() StartFrame =
|
void() StartFrame =
|
||||||
|
@ -51,14 +68,6 @@ void() StartFrame =
|
||||||
zent = find (world, classname, "ai_zombie");
|
zent = find (world, classname, "ai_zombie");
|
||||||
while (zent)
|
while (zent)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
if (zent.head)
|
|
||||||
remove (zent.head);
|
|
||||||
if (zent.larm)
|
|
||||||
remove (zent.larm);
|
|
||||||
if (zent.rarm)
|
|
||||||
remove (zent.rarm);
|
|
||||||
*/
|
|
||||||
remove (zent);
|
remove (zent);
|
||||||
zent = find (zent, classname, "ai_zombie");
|
zent = find (zent, classname, "ai_zombie");
|
||||||
}
|
}
|
||||||
|
@ -73,28 +82,9 @@ void() StartFrame =
|
||||||
setmodel(zent, "models/way/normal_way.spr");
|
setmodel(zent, "models/way/normal_way.spr");
|
||||||
zent = find (zent, classname, "waypoint");
|
zent = find (zent, classname, "waypoint");
|
||||||
}
|
}
|
||||||
zent = find (world, classname, "door_nzp_cost");
|
Way_SetBrushEntNonSolid("door_nzp_cost");
|
||||||
while (zent)
|
Way_SetBrushEntNonSolid("door_nzp");
|
||||||
{
|
Way_SetBrushEntNonSolid("door");
|
||||||
zent.solid = SOLID_NOT;
|
|
||||||
zent.touch = SUB_Null;
|
|
||||||
zent = find (zent, classname, "door_nzp_cost");
|
|
||||||
}
|
|
||||||
zent = find (world, classname, "door_nzp");
|
|
||||||
while (zent)
|
|
||||||
{
|
|
||||||
zent.solid = SOLID_NOT;
|
|
||||||
zent.touch = SUB_Null;
|
|
||||||
zent.solid = SOLID_NOT;
|
|
||||||
zent = find (zent, classname, "door_nzp");
|
|
||||||
}
|
|
||||||
zent = find (world, classname, "window");
|
|
||||||
while (zent)
|
|
||||||
{
|
|
||||||
zent.solid = SOLID_NOT;
|
|
||||||
zent.touch = SUB_Null;
|
|
||||||
zent = find (zent, classname, "window");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1697,22 +1697,6 @@ void () Impulse_Functions =
|
||||||
break;
|
break;
|
||||||
case 100:
|
case 100:
|
||||||
cvar_set("waypoint_mode", "1");
|
cvar_set("waypoint_mode", "1");
|
||||||
|
|
||||||
local entity d;
|
|
||||||
d = find(world,classname,"door_nzp_cost");
|
|
||||||
while(d != world)
|
|
||||||
{
|
|
||||||
d.classname = "door_nzp";
|
|
||||||
d = find(d,classname,"door_nzp_cost");
|
|
||||||
}
|
|
||||||
d = find(world,classname,"door_open");
|
|
||||||
while(d != world)
|
|
||||||
{
|
|
||||||
d.classname = "door_nzp";
|
|
||||||
d = find(d,classname,"door_open");
|
|
||||||
}
|
|
||||||
|
|
||||||
waypoint_mode = 1;
|
|
||||||
localcmd("restart\n");
|
localcmd("restart\n");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue