GLOBAL: Merge HANDHELD and QUAKESPASM, rebrand as STANDARD/FTE

This commit is contained in:
Steam Deck User 2023-02-05 16:03:57 -05:00
parent 8a34ab4da2
commit 87dde10e3b
40 changed files with 838 additions and 2123 deletions

View file

@ -15,9 +15,8 @@ jobs:
- name: Zip Progs
working-directory: ./build
run: |
zip -r -j pc-nzp-qc.zip pc/*
zip -r -j handheld-nzp-qc.zip handheld/*
zip -r -j quakespasm-nzp-qc.zip quakespasm/*
zip -r -j fte-nzp-qc.zip fte/*
zip -r -j standard-nzp-qc.zip standard/*
- name: Generate Build Date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d-%H-%M-%S')"
@ -40,36 +39,27 @@ jobs:
This is a **bleeding edge** NZ:P QuakeC release, stability is not guarenteed and you may need to grab an updated asset release if this update depends on new models/textures/etc.
To install:
- Grab the .ZIP archive for your desired platform below (*-nzp-qc.zip, use `handheld-nzp-qc.zip` for 3DS/PSP and `quakespasm-nzp-qc.zip` for Switch/VITA).
- Grab the .ZIP archive for your desired platform below (fte-nzp-qc.zip for PC platforms/WebGL, standard-nzp-qc.zip for everything else..).
- Extract the contents of the .ZIP archive to your nzp folder (Example: copy `progs.dat` and `progs.lno` to `PSP/GAME/nzportable/nzp`).
draft: true
prerelease: false
- name: Upload QUAKESPASM QC
- name: Upload STANDARD QC
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/quakespasm-nzp-qc.zip
asset_name: quakespasm-nzp-qc.zip
asset_path: ./build/standard-nzp-qc.zip
asset_name: standard-nzp-qc.zip
asset_content_type: application/zip
- name: Upload PC QC
- name: Upload FTE QC
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/pc-nzp-qc.zip
asset_name: pc-nzp-qc.zip
asset_content_type: application/zip
- name: Upload HANDHELD QC
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/handheld-nzp-qc.zip
asset_name: handheld-nzp-qc.zip
asset_path: ./build/fte-nzp-qc.zip
asset_name: fte-nzp-qc.zip
asset_content_type: application/zip
- name: Publish Release
uses: StuYarrow/publish-release@v1

View file

@ -1,4 +1,4 @@
../../build/pc/csprogs.dat
../../build/fte/csprogs.dat
../source/client/defs/fte.qc
../source/shared/defs/custom.qc

View file

@ -1,4 +1,4 @@
../../build/pc/qwprogs.dat
../../build/fte/qwprogs.dat
../source/server/defs/fte.qc
../source/shared/defs/custom.qc
@ -6,7 +6,7 @@
../source/server/defs/custom.qc
../source/server/clientfuncs.qc
../source/server/dummies/generic.qc
../source/server/dummies.qc
../source/server/rounds.qc
../source/server/nzdparser.qc
../source/server/main.qc

View file

@ -1,46 +0,0 @@
../../build/handheld/progs.dat
#pragma warning disable Q208
../source/server/defs/handheld.qc
../source/shared/defs/custom.qc
../source/shared/weapon_defines.qc
../source/server/defs/custom.qc
../source/server/clientfuncs.qc
../source/server/non_fte_specifics.qc
../source/server/dummies/generic.qc
../source/server/rounds.qc
../source/server/nzdparser.qc
../source/server/main.qc
../source/server/utilities/command_parser.qc
../source/server/utilities/math.qc
../source/server/player.qc
../source/server/damage.qc
../source/server/entities/sub_functions.qc
../source/server/entities/sounds.qc
../source/server/entities/triggers.qc
../source/server/entities/explosive_barrel.qc
../source/server/entities/teleporter.qc
../source/server/entities/map_entities.qc
../source/server/entities/traps.qc
../source/server/entities/lights.qc
../source/server/entities/doors.qc
../source/server/entities/window.qc
../source/server/entities/machines.qc
../source/server/weapons/frames_core.qc
../source/server/weapons/ray_gun.qc
../source/server/weapons/weapon_core.qc
../source/server/entities/powerups.qc
../source/server/ai/ai_core.qc
../source/server/ai/standard/waypoints_func.qc
../source/server/ai/standard/waypoints_core.qc
../source/server/ai/zombie_core.qc
../source/server/ai/crawler_core.qc
../source/server/ai/dog_core.qc
../source/server/items.qc

View file

@ -1,8 +1,8 @@
../../build/quakespasm/progs.dat
../../build/standard/progs.dat
#pragma warning disable Q208
../source/server/defs/quakespasm.qc
../source/server/defs/standard.qc
../source/shared/defs/custom.qc
../source/shared/weapon_defines.qc
../source/server/defs/custom.qc
@ -10,7 +10,7 @@
../source/server/non_fte_specifics.qc
../source/server/dummies/generic.qc
../source/server/dummies.qc
../source/server/rounds.qc
../source/server/nzdparser.qc
../source/server/main.qc

View file

@ -530,23 +530,31 @@ void() PathfindToEnemy =
//just to stop any warns.
path_failure = 0;
#ifndef PC
#ifndef FTE
path_result = Do_Pathfind_psp(self, self.enemy);
#else
#else
path_result = Do_Pathfind(self, self.enemy);
#endif
#endif // FTE
if (path_result >= 1) {
#ifndef PC
#ifndef FTE
self.goaldummy.origin = Get_First_Waypoint(self, self.origin, VEC_HULL_MIN, VEC_HULL_MAX);
setorigin(self.goaldummy, self.goaldummy.origin);
path_failure = path_result;
#else
#else
self.goalway = path_result;
setorigin(self.goaldummy,waypoints[self.goalway].org);
path_failure = self.goalway;
#endif
#endif // FTE
self.goalentity = self.goaldummy;
self.chase_time = time + 7;
@ -555,15 +563,21 @@ void() PathfindToEnemy =
self.goalentity = self.enemy;
self.chase_time = time + 6;
} else {
#ifdef PC
#ifdef FTE
bprint(PRINT_HIGH, "FirstPathfind Failure\n");
#endif
#endif // FTE
}
}
void() NextPathfindToEnemy {
// same as PathfindToEnemy on non-FTE platforms
#ifndef PC
#ifndef FTE
float path_success;
path_success = Do_Pathfind_psp(self,self.enemy);
if(path_success ==1) {
@ -577,7 +591,9 @@ void() NextPathfindToEnemy {
} else {
bprint(PRINT_HIGH, "NextPathfind Failure\n"); // this lags like hell
}
#else
#else
self.way_cur++;
if (self.way_cur < 40 && self.way_path[self.way_cur] != -1) {
@ -586,10 +602,13 @@ void() NextPathfindToEnemy {
} else {
self.way_cur = 0;
}
#endif
#endif // FTE
}
#ifdef PC
#ifdef FTE
float(vector start, vector min, vector max, vector end, float nomonsters, entity forent) tracemove
{
//was tracebox
@ -601,7 +620,8 @@ float(vector start, vector min, vector max, vector end, float nomonsters, entity
return 0;
}
}
#endif
#endif // FTE
void(float dist) Inside_Walk = {
if(self.enemy_timeout < time || self.enemy == world || self.enemy.downed == true) {
@ -649,11 +669,17 @@ void(float dist) Inside_Walk = {
//============ GoalDummy is Target ============
if(self.goalentity == self.goaldummy) {
if(nearby(self.goaldummy.origin)) {
#ifndef PC
#ifndef FTE
NextPathfindToEnemy();
#else
#else
PathfindToEnemy();
#endif
#endif // FTE
}
if(self.chase_time < time) {

View file

@ -248,23 +248,35 @@ void(entity who) makeCrawler =
if(who.head.deadflag)
{
setmodel(who.head,"models/ai/zhc^.mdl");
#ifndef PC
#ifndef FTE
updateLimb (who, 0, world);
#endif // PC
#endif // FTE
}
if(who.larm.deadflag)
{
setmodel(who.larm,"models/ai/zalc(.mdl");
#ifndef PC
#ifndef FTE
updateLimb (who, 1, world);
#endif // PC
#endif // FTE
}
if(who.rarm.deadflag)
{
setmodel(who.rarm,"models/ai/zarc(.mdl");
#ifndef PC
#ifndef FTE
updateLimb (who, 2, world);
#endif // PC
#endif // FTE
}
who.crawling = 1;

View file

@ -1,9 +1,9 @@
/*
server/ai/fte/waypoints_core.qc
pc waypointing
FTE waypointing
Copyright (C) 2021 NZ:P Team
Copyright (C) 2021-2023 NZ:P Team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@ -260,11 +260,7 @@ void () Link_Waypoints =
float i;
entity tempe;
for (i = 0; i < MAX_WAY_TARGETS; i++) {
#ifdef PC
tempe = findfloat (world, waynum, active_way.targets[i]);
#else
tempe = find (world, waynum, active_way.targets[i]);
#endif
if (tempe == world) {
if (Link(active_way, current_way)) {
@ -394,11 +390,7 @@ void() Save_Waypoints
fputs(file, " [\n");
for (i = 0; i < MAX_WAY_TARGETS; i++) {
if (dway.targets[i] != "") {
#ifdef PC
tempe = findfloat (world, waynum, dway.targets[i]);
#else
tempe = find (world, waynum, dway.targets[i]);
#endif
if (tempe != world) {
fputs(file, strcat(" ", strcat(dway.targets[i], "\n")));
@ -655,9 +647,6 @@ void() Load_Waypoints_Legacy
h = (fgets(file));
trg8 = substring(h, 10, 20);
#ifndef PC
Create_Waypoint(where, which, special, trg, trg2, trg3, trg4, trg5, trg6, trg7, trg8);
#else
waypoint_ai waypoint;
waypoint = waypoints[which];
@ -673,7 +662,6 @@ void() Load_Waypoints_Legacy
waypoints[which].target_id[5] = stof(trg6);
waypoints[which].target_id[6] = stof(trg7);
waypoints[which].target_id[7] = stof(trg8);
#endif
h = (fgets(file));
h = (fgets(file));

View file

@ -1,828 +0,0 @@
/*
server/ai/pathfind_core.qc
generic waypoints
Copyright (C) 2021 NZ:P Team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
*/
void() creator_way_touch =
{
if (cvar("waypoint_mode")) {
if (other.classname != "player") {
return;
}
current_way = self;
}
}
void () Create_New_Waypoint =
{
float way_count;
float tempf;
entity tempe;
entity new_way;
way_count = -1;
tempe = find (world, classname, "waypoint");
while (tempe) {
tempf = stof(tempe.waynum);
if (tempf > way_count) {
way_count = tempf;
}
tempe = find (tempe, classname, "waypoint");
}
new_way = spawn();
setorigin(new_way, self.origin);
//new_way.flags = FL_ITEM;
new_way.solid = SOLID_TRIGGER;
setmodel(new_way, "models/way/normal_way.spr");
new_way.classname = "waypoint";
new_way.waynum = ftos(way_count + 1);
new_way.targetname = strzone(new_way.targetname);
bprint (PRINT_HIGH, "Created waypoint ");
bprint (PRINT_HIGH, new_way.waynum);
bprint (PRINT_HIGH, "\n");
new_way.touch = creator_way_touch;
}
void () Make_Special_Waypoint =
{
if (self.classname != "player" || !active_way) {
return;
}
if (active_way.targetname != "") {//Toggling it back off
setmodel(active_way, "models/way/current_way.spr");
active_way.targetname = "";
bprint (PRINT_HIGH, "Waypoint ");
bprint (PRINT_HIGH, active_way.waynum);
bprint (PRINT_HIGH, " is no longer a special waypoint\n");
return;
}
if (active_way) {
if(self.active_door == world) {
bprint (PRINT_HIGH, "Error: no door selected!\n");
return;
}
if(self.active_door.wayTarget == "") {
bprint (PRINT_HIGH, "Error: Door has no wayTarget value!\n");
return;
}
setmodel(active_way, "models/way/current_way_door.spr");
active_way.targetname = self.active_door.wayTarget;
bprint (PRINT_HIGH, "special waypoint ");
bprint (PRINT_HIGH, active_way.waynum);
bprint (PRINT_HIGH, " named ");
bprint (PRINT_HIGH, active_way.targetname);
bprint (PRINT_HIGH, "\n");
}
}
void () Move_Waypoint =
{
if (!active_way)
return;
setorigin (active_way, self.origin);
bprint (PRINT_HIGH, "Moved waypoint ");
bprint (PRINT_HIGH, active_way.waynum);
bprint (PRINT_HIGH, "\n");
}
void () Select_Waypoint =
{
if (self.classname != "player")
return;
if (!current_way)
return;
entity tempe;
if (current_way == active_way)
active_way = world;
else
active_way = current_way;
tempe = find (world, classname, "waypoint");
while (tempe)
{
if (tempe.targetname != "")
setmodel(tempe, "models/way/normal_way_door.spr");
else
setmodel(tempe, "models/way/normal_way.spr");
tempe = find (tempe, classname, "waypoint");
}
if (active_way)
{
if (active_way.targetname != "")
setmodel(active_way, "models/way/current_way_door.spr");
else
setmodel(active_way, "models/way/current_way.spr");
bprint (PRINT_HIGH, "Selected waypoint ");
bprint (PRINT_HIGH, active_way.waynum);
if(active_way.targetname != "")
{
bprint (PRINT_HIGH, ", special tag ");
bprint (PRINT_HIGH, active_way.targetname);
}
bprint (PRINT_HIGH, "\n");
float i;
for (i = 0; i < MAX_WAY_TARGETS; i++) {
tempe = find (world, waynum, active_way.targets[i]);
if (tempe) {
if (tempe.targetname != "")
setmodel(tempe, "models/way/last_way_door.spr");
else
setmodel(tempe, "models/way/last_way.spr");
} else {
active_way.targets[i] = "";
}
}
}
}
void() Remove_Waypoint =
{
entity tempe;
float i;
if (!active_way)
return;
tempe = find (world, classname, "waypoint");
while (tempe) {
for (i = 0; i < MAX_WAY_TARGETS; i++) {
if (tempe.targets[i] == active_way.waynum) {
tempe.targets[i] = "";
}
}
tempe = find (tempe, classname, "waypoint");
}
bprint(PRINT_HIGH, "Removed waypoint ");
bprint(PRINT_HIGH, active_way.waynum);
bprint(PRINT_HIGH, "\n");
remove (active_way);
}
float Waypoint_Linked_To(entity from, entity to) {
float i;
for (i = 0; i < MAX_WAY_TARGETS; i++) {
if (from.waynum == to.targets[i]) {
bprint(PRINT_HIGH, "These waypoints are already linked!\n");
return 1;
}
}
return 0;
}
float Link (entity from, entity to) {
float i;
entity tempe;
for (i = 0; i < MAX_WAY_TARGETS; i++) {
tempe = find (world, waynum, from.targets[i]);
if (tempe == world || tempe == to) {
from.targets[i] = to.waynum;
bprint(PRINT_HIGH, "Linked waypoint ");
bprint(PRINT_HIGH, to.waynum);
bprint(PRINT_HIGH, " to ");
bprint(PRINT_HIGH, from.waynum);
bprint(PRINT_HIGH, "\n");
if (to.targetname != "") {
setmodel(to, "models/way/last_way_door.spr");
} else {
setmodel(to, "models/way/last_way.spr");
}
return 1;
}
}
return 0;
}
void () Link_Waypoints =
{
if (self.classname != "player")
return;
if (!current_way)
return;
if (!active_way)
return;
if (current_way == active_way)
return;
if (Waypoint_Linked_To(current_way, active_way)) {
bprint(PRINT_HIGH, "These waypoints are already linked!\n");
return;
}
float i;
entity tempe;
for (i = 0; i < MAX_WAY_TARGETS; i++) {
#ifdef PC
tempe = findfloat (world, waynum, active_way.targets[i]);
#else
tempe = find (world, waynum, active_way.targets[i]);
#endif
if (tempe == world) {
if (Link(active_way, current_way)) {
return;
}
}
}
bprint(PRINT_HIGH, "no targets remaining!\n");
}
void() Dual_Link_Waypoints =
{
if (self.classname != "player" || !current_way || !active_way || current_way == active_way) {
return;
}
float result1,result2;
result1 = Waypoint_Linked_To(current_way,active_way);
result2 = Waypoint_Linked_To(active_way,current_way);
if(result1 && result2) {
bprint(PRINT_HIGH, "Both waypoints already linked!\n");
return;
}
if(!result1)
{
if (Link(current_way,active_way)) {
bprint(PRINT_HIGH, strcat("Linked waypoint ", strcat(current_way.waynum, strcat(" to ",strcat(active_way.waynum, "\n")))));
} else {
bprint(PRINT_HIGH, strcat("ERROR: Could not link waypoint ", strcat(current_way.waynum, strcat(" to ", strcat(active_way.waynum, "\n")))));
}
}
if(!result2)
{
if (Link(active_way,current_way)) {
bprint(PRINT_HIGH, strcat("Linked waypoint ", strcat(active_way.waynum, strcat(" to ", strcat(current_way.waynum, "\n")))));
} else {
bprint(PRINT_HIGH, strcat("ERROR: Could not link waypoint ", strcat(active_way.waynum, strcat(" to ", strcat(current_way.waynum, "\n")))));
}
}
}
//alter auto_link_waypoints to iterate through the closest waypoints from closest to furthest
// on the innermost loop, we find the next closest waypoint that is further away from the last closest waypoint, and we use that!
void() Auto_Link_Waypoints =
{
entity tempe1, tempe2;
tempe1 = find(world,classname,"waypoint");
while(tempe1 != world)
{
tempe2 = find(world,classname,"waypoint");
while(tempe2 != world)
{
if(tempe1 == tempe2)
{
tempe2 = find(tempe2,classname,"waypoint");
continue;
}
if(tracemove(tempe1.origin,VEC_HULL_MIN,VEC_HULL_MAX,tempe2.origin,TRUE,self))
{
Link(tempe1,tempe2);
}
tempe2 = find(tempe2,classname,"waypoint");
}
tempe1 = find(tempe1,classname,"waypoint");
}
}
//alter auto_link_waypoints to iterate through the closest waypoints from closest to furthest
// on the innermost loop, we find the next closest waypoint that is further away from the last closest waypoint, and we use that!
void() Remove_Links =
{
entity tempe;
tempe = find(world,classname,"waypoint");
while(tempe != world)
{
float i;
for (i = 0; i < MAX_WAY_TARGETS; i = i + 1) {
if (tempe.targetname != "")
setmodel(tempe, "models/way/normal_way_door.spr");
else
setmodel(tempe, "models/way/normal_way.spr");
tempe.targets[i] = "";
}
tempe = find(tempe,classname,"waypoint");
}
}
void() Save_Waypoints
{
float file;
string h;
float i;
entity tempe;
h = strcat(mappath, ".way");
file = fopen (h, FILE_WRITE);
dprint (strcat("Saving waypoints ", strcat(h, "\n")));
local entity dway;
//fputs(file, "begin\n");
dway = find(world, classname, "waypoint");
while (dway)
{
fputs(file,"waypoint\n");
fputs(file,"{\n");
fputs(file, strcat(" id: ", strcat(dway.waynum, "\n")));
fputs(file, strcat(" origin: ", strcat(vtos(dway.origin), "\n")));
if (dway.targetname != "") {
fputs(file, strcat(" door: ", strcat(dway.targetname, "\n")));
}
fputs(file, " targets:\n");
fputs(file, " [\n");
for (i = 0; i < MAX_WAY_TARGETS; i++) {
if (dway.targets[i] != "") {
#ifdef PC
tempe = findfloat (world, waynum, dway.targets[i]);
#else
tempe = find (world, waynum, dway.targets[i]);
#endif
if (tempe != world) {
fputs(file, strcat(" ", strcat(dway.targets[i], "\n")));
} else {
tempe = find (world, waynum, dway.targets[i]);
if (tempe != world) {
fputs(file, strcat(" ", strcat(dway.targets[i], "\n")));
}
}
}
}
fputs(file, " ]\n");
fputs(file,"}\n");
dway = find(dway, classname, "waypoint");
if (dway)
fputs(file,"\n");
}
fclose(file);
}
void (vector here, float which, string special, string trg, string trg2, string trg3, string trg4, string trg5, string trg6, string trg7, string trg8) Create_Waypoint =
{
entity new_way;
new_way = spawn();
setorigin(new_way, here);
//new_way.flags = FL_ITEM;
new_way.solid = SOLID_TRIGGER;
if (cvar("waypoint_mode"))
setmodel(new_way, "models/way/normal_way.spr");
new_way.classname = "waypoint";
new_way.waynum = ftos(which);
dprint ("Created waypoint ");
dprint (new_way.waynum);
dprint ("\n");
if (special != "")
{
if (!cvar("waypoint_mode"))
new_way.classname = "waypoint_s";
if (cvar("waypoint_mode"))
setmodel(new_way, "models/way/normal_way_door.spr");
new_way.targetname = special;
dprint ("Special waypoint ");
dprint (new_way.targetname);
dprint ("\n");
//current_special++;
}
new_way.targets[0] = trg;
new_way.targets[1] = trg2;
new_way.targets[2] = trg3;
new_way.targets[3] = trg4;
new_way.targets[4] = trg5;
new_way.targets[5] = trg6;
new_way.targets[6] = trg7;
new_way.targets[7] = trg8;
new_way.touch = creator_way_touch;
}
float waypoints_loaded;
void() Load_Waypoints
{
float file, point;
string h;
float targetcount, loop;
entity new_way;
h = strcat(mappath, ".way");
file = fopen (h, FILE_READ);
if (file == -1)
{
dprint("Error: file not found \n");
return;
}
new_way = spawn();
targetcount = 0;
point = 0;
loop = 1;
while (loop)
{
string line;
line = fgets(file);
if not (line) {
bprint(PRINT_HIGH, "End of file\n");
loop = 0;
break;
}
h = strtrim(line);
//bprint(PRINT_HIGH, strcat(h, "\n"));
if (h == "") {
continue;
}
switch (point) {
case 0:
if (h == "waypoint") {
new_way = spawn();
new_way.solid = SOLID_TRIGGER;
new_way.model = "models/way/normal_way.spr";
setmodel(new_way, "models/way/normal_way.spr");
new_way.classname = "waypoint";
new_way.touch = creator_way_touch;
point = 1;
targetcount = 0;
} else if (h == "Waypoint") {
bprint(PRINT_HIGH, "Identified .way as legacy..\n");
point = 99;
Load_Waypoints_Legacy();
loop = 0;
break;
} else {
bprint(PRINT_HIGH, strcat("Error: unknown point ", strcat(h, "\n")));
}
break;
case 1:
if (h == "{") {
point = 2;
} else {
bprint(PRINT_HIGH, strcat("Error: unknown variable ", strcat(h, " expected {\n")));
}
break;
case 2:
tokenize(h);
string value, variable;
variable = strtrim(argv(0));
value = strtrim(argv(2));
//bprint(PRINT_HIGH, strcat(variable, "\n"));
switch (variable) {
case "origin":
print(strcat(value, "\n"));
new_way.origin = stov(value);
setorigin(new_way, new_way.origin);
break;
case "id":
new_way.waynum = value;
break;
case "door":
new_way.targetname = value;
setmodel(new_way, "models/way/normal_way_door.spr");
break;
case "targets":
point = 3;
break;
case "}":
point = 0;
break;
default:
bprint(PRINT_HIGH, strcat("Error: unknown variable ", strcat(variable, "\n")));
break;
}
break;
case 3:
if (h == "[") {
point = 4;
} else {
bprint(PRINT_HIGH, strcat("Error: unknown variable ", strcat(h, " expected [\n")));
}
break;
case 4:
if (targetcount >= MAX_WAY_TARGETS) {
bprint(PRINT_HIGH, "Error: Target count too high for waypoint\n");
} else if (h == "]") {
point = 2;
} else {
bprint(PRINT_HIGH, strcat(strcat("WAYPOINT TARGET: ", strcat(strcat(ftos(targetcount), " "), h)), "\n"));
new_way.targets[targetcount] = h;
targetcount++;
}
break;
}
}
fclose(file);
waypoints_loaded = 1;
}
void() Load_Waypoints_Legacy
{
float file, which;
string h, special, trg, trg2, trg3, trg4, trg5, trg6, trg7, trg8;
local vector where;
h = strcat(mappath, ".way");
file = fopen (h, FILE_READ);
if (file == -1)
{
dprint("Error: file not found \n");
return;
}
while (1)
{
dprint("Loading waypoint\n");
// the first line is just a comment, ignore it
h = fgets(file);
if (h != "Waypoint")
{
bprint(PRINT_HIGH, "Last waypoint\n");
fclose(file);
return;
}
h = fgets(file);
h = fgets(file);
h = substring(h, 9, 20);
where = stov(h);
h = (fgets(file));
h = substring(h, 5, 20);
which = stof(h);
h = (fgets(file));
special = substring(h, 10, 20);
h = (fgets(file));
trg = substring(h, 9, 20);
h = (fgets(file));
trg2 = substring(h, 10, 20);
h = (fgets(file));
trg3 = substring(h, 10, 20);
h = (fgets(file));
trg4 = substring(h, 10, 20);
h = (fgets(file));
trg5 = substring(h, 10, 20);
h = (fgets(file));
trg6 = substring(h, 10, 20);
h = (fgets(file));
trg7 = substring(h, 10, 20);
h = (fgets(file));
trg8 = substring(h, 10, 20);
#ifndef PC
Create_Waypoint(where, which, special, trg, trg2, trg3, trg4, trg5, trg6, trg7, trg8);
#else
waypoint_ai waypoint;
waypoint = waypoints[which];
waypoints[which].id = which;
waypoints[which].org = where;
waypoints[which].targetdoor = special;
waypoints[which].target_id[0] = stof(trg);
waypoints[which].target_id[1] = stof(trg2);
waypoints[which].target_id[2] = stof(trg3);
waypoints[which].target_id[3] = stof(trg4);
waypoints[which].target_id[4] = stof(trg5);
waypoints[which].target_id[5] = stof(trg6);
waypoints[which].target_id[6] = stof(trg7);
waypoints[which].target_id[7] = stof(trg8);
#endif
h = (fgets(file));
h = (fgets(file));
}
}
void VisualizePathfind() {
if (self.classname != "player")
return;
if (!current_way)
return;
if (!active_way)
return;
if (current_way == active_way)
return;
Pathfind(self, stof(active_way.waynum), stof(current_way.waynum));
}
.float waypoint_delay;
//Waypoint logic functions
void () Waypoint_Functions =
{
// naievil -- archaic
/*
switch (self.impulse) {
case 100:
Create_New_Waypoint();
break;
case 101:
Make_Special_Waypoint();
break;
case 102:
Select_Waypoint();
break;
case 103:
Move_Waypoint();
break;
case 104:
Link_Waypoints ();
break;
case 105:
Dual_Link_Waypoints();
break;
case 106:
Save_Waypoints();
break;
case 107:
Load_Waypoints();
break;
case 108:
Load_Waypoints_Legacy();
break;
case 109:
Remove_Waypoint();
//VisualizePathfind();
break;
case 110:
Auto_Link_Waypoints();
break;
case 111:
Remove_Links();
break;
}
self.impulse = 0;
*/
switch (self.impulse) {
case 23:
Save_Waypoints();
break;
case 22:
if (!waypoints_loaded)
Load_Waypoints();
break;
case 110:
Move_Waypoint();
break;
}
self.impulse = 0;
// Match what we display on the screen
if (self.button0 && self.waypoint_delay < time) {
Create_New_Waypoint();
self.waypoint_delay = time + 1;
}
if (self.button7 && self.waypoint_delay < time) {
Select_Waypoint();
self.waypoint_delay = time + 0.25;
}
if (self.button8 && self.waypoint_delay < time) {
Link_Waypoints ();
self.waypoint_delay = time + 0.5;
}
if (self.button6 && self.waypoint_delay < time) {
Remove_Waypoint();
self.waypoint_delay = time + 0.5;
}
if (self.button5 && self.waypoint_delay < time) {
Make_Special_Waypoint();
self.waypoint_delay = time + 1;
}
};
void () Waypoint_Logic =
{
if (!waypoint_mode) {
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();
};

View file

@ -397,11 +397,16 @@ void(float which) SetZombieHitBox =
void() Zombie_Think = //called every frame for zombies
{
if (self.onfire) {
#ifdef PC
#ifdef FTE
te_flamejet(self.origin, v_up*8, 10);
#else
#else
particle (self.origin, v_up*8, 0, 0);
#endif
#endif // FTE
if (self.ltime < time && self.onfire){
DamageHandler(self, self.firer, 300, S_NORMAL);
@ -982,17 +987,21 @@ void() removeZombie =
setmodel(self.rarm,"");
setmodel(self.head,"");
#ifdef PC
#ifdef FTE
remove(self.larm);
remove(self.rarm);
remove(self.head);
#endif
#endif // FTE
#ifndef PC
#ifndef FTE
updateLimb (self, 0, world);
updateLimb (self, 1, world);
updateLimb (self, 2, world);
#endif
#endif // FTE
setorigin(self,'0 0 0');
setorigin (self.goaldummy, '0 0 0');
@ -1315,10 +1324,13 @@ void() Zombie_Find_Tesla_Target =
targetorg = zombs.origin + '0 0 13';
// shoot lightning
#ifdef PC
#ifdef FTE
te_lightning2(self, org, targetorg);
#endif
#ifdef PSP
#else
WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
WriteByte (MSG_BROADCAST, TE_LIGHTNING2);
WriteEntity (MSG_BROADCAST, self);
@ -1328,7 +1340,8 @@ void() Zombie_Find_Tesla_Target =
WriteCoord (MSG_BROADCAST, targetorg_x);
WriteCoord (MSG_BROADCAST, targetorg_y);
WriteCoord (MSG_BROADCAST, targetorg_z);
#endif
#endif // FTE
// anim play
tempe = self;
@ -1497,9 +1510,12 @@ void(float i) spawnSingleZombEnt =
zSpawn.head.solid = SOLID_NOT;
zSpawn.head.movetype = MOVETYPE_STEP;
zSpawn.head.takedamage = DAMAGE_NO;
#ifndef PC
#ifndef FTE
updateLimb (zSpawn, 0, zSpawn.head);
#endif
#endif // FTE
zSpawn.larm = spawn();
zSpawn.larm.classname = "in_ai_zombie_larm";
@ -1507,9 +1523,12 @@ void(float i) spawnSingleZombEnt =
zSpawn.larm.solid = SOLID_NOT;
zSpawn.larm.movetype = MOVETYPE_STEP;
zSpawn.larm.takedamage = DAMAGE_NO;
#ifndef PC
#ifndef FTE
updateLimb (zSpawn, 1, zSpawn.larm);
#endif
#endif // FTE
zSpawn.rarm = spawn();
zSpawn.rarm.classname = "in_ai_zombie_rarm";
@ -1517,9 +1536,13 @@ void(float i) spawnSingleZombEnt =
zSpawn.rarm.solid = SOLID_NOT;
zSpawn.rarm.movetype = MOVETYPE_STEP;
zSpawn.rarm.takedamage = DAMAGE_NO;
#ifndef PC
#ifndef FTE
updateLimb (zSpawn, 2, zSpawn.rarm);
#endif
#endif
};
void(entity szombie) SetUpHitBoxes =
{
@ -1538,11 +1561,13 @@ void(entity szombie) SetUpHitBoxes =
szombie.rarm.classname = "ai_zombie_rarm";
szombie.rarm.takedamage = DAMAGE_YES;
#ifdef PC
#ifdef FTE
szombie.head.dimension_solid = HITBOX_DIM_LIMBS;
szombie.larm.dimension_solid = HITBOX_DIM_LIMBS;
szombie.rarm.dimension_solid = HITBOX_DIM_LIMBS;
#endif // PC
#endif // FTE
local entity oldself = self;
self = szombie;
@ -1622,13 +1647,14 @@ void(entity where) spawn_a_zombieB =
return;
}
#ifdef PC
#ifdef FTE
szombie.head = spawn();
szombie.rarm = spawn();
szombie.larm = spawn();
szombie.head.owner = szombie.rarm.owner = szombie.larm.owner = szombie;
#endif
#endif // FTE
szombie.origin = where.origin;
@ -1645,17 +1671,24 @@ void(entity where) spawn_a_zombieB =
setmodel(szombie.head, "models/ai/zh^.mdl");
setmodel(szombie.rarm, "models/ai/zar(.mdl");
setmodel(szombie.larm, "models/ai/zal(.mdl");
#ifndef PC
#ifndef FTE
updateLimb (szombie, 0, szombie.head);
updateLimb (szombie, 1, szombie.larm);
updateLimb (szombie, 2, szombie.rarm);
#endif
#endif // FTE
szombie.solid = SOLID_CORPSE;
#ifdef PC
#ifdef FTE
szombie.dimension_solid = HITBOX_DIM_ZOMBIES;
#endif // PC
#endif // FTE
szombie.movetype = MOVETYPE_WALK;
setmodel(szombie, "models/ai/zb%.mdl");
szombie.hop_step = 0;
@ -1742,7 +1775,8 @@ void(entity where) spawn_a_zombieB =
//LinkZombiesHitbox();
#ifndef PC
#ifndef FTE
//
// Zombie skin setting
//
@ -1757,7 +1791,8 @@ void(entity where) spawn_a_zombieB =
szombie.skin = 2;
else
szombie.skin = 3;
#endif // PC
#endif // FTE
szombie.head.skin = szombie.larm.skin = szombie.rarm.skin = szombie.skin;

View file

@ -27,7 +27,7 @@
void SetUpdate(entity client, float type, float val1, float val2, float val3)
{
#ifdef PC
#ifdef FTE
if (type != 2)
{
@ -51,10 +51,10 @@ void SetUpdate(entity client, float type, float val1, float val2, float val3)
multicast('0 0 0', MULTICAST_ALL);
}
#endif // PC
#endif // FTE
}
#ifdef PC
#ifdef FTE
void(entity to, float type, float cost, float weapon) useprint = {
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
WriteByte(MSG_MULTICAST, EVENT_USEPRINT);
@ -64,10 +64,10 @@ void(entity to, float type, float cost, float weapon) useprint = {
msg_entity = to;
multicast('0 0 0', MULTICAST_ONE);
}
#endif // PC
#endif // FTE
void(vector org) CallExplosion = {
#ifndef PC
#ifndef FTE
WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
WriteByte (MSG_BROADCAST, TE_EXPLOSION);
@ -84,22 +84,22 @@ void(vector org) CallExplosion = {
WriteCoord(MSG_MULTICAST, org_z);
multicast('0 0 0', MULTICAST_ALL);
#endif // PC
#endif // FTE
}
void NotifyNewRound(float to) {
#ifdef PC
#ifdef FTE
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
WriteByte(MSG_MULTICAST, EVENT_NEWROUND);
WriteByte(MSG_MULTICAST, to);
multicast('0 0 0', MULTICAST_ALL);
#endif // PC
#endif // FTE
}
void SetRound(entity client, float to) {
#ifdef PC
#ifdef FTE
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
WriteByte(MSG_MULTICAST, EVENT_SETROUND);
@ -107,12 +107,12 @@ void SetRound(entity client, float to) {
msg_entity = client;
multicast('0 0 0', MULTICAST_ONE);
#endif // PC
#endif // FTE
}
void SetPerk(entity client, float to)
{
#ifdef PC
#ifdef FTE
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
WriteByte(MSG_MULTICAST, EVENT_PERK);
@ -120,12 +120,12 @@ void SetPerk(entity client, float to)
msg_entity = client;
multicast('0 0 0', MULTICAST_ONE);
#endif // PC
#endif // FTE
}
void(float to) SwitchWeapon =
{
#ifdef PC
#ifdef FTE
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
WriteByte(MSG_MULTICAST, EVENT_WEAPONCHANGE);
@ -136,12 +136,12 @@ void(float to) SwitchWeapon =
// hotfix for weapon2models not reseting
self.weapon2model = GetWeapon2Model(to);
#endif // PC
#endif // FTE
}
void(string to, float skin) UpdateVmodel =
{
#ifdef PC
#ifdef FTE
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
WriteByte(MSG_MULTICAST, EVENT_UPDATEVMODEL);
@ -150,12 +150,12 @@ void(string to, float skin) UpdateVmodel =
msg_entity = self;
multicast('0 0 0', MULTICAST_ONE);
#endif // PC
#endif // FTE
}
void(string to, float skin) UpdateV2model =
{
#ifdef PC
#ifdef FTE
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
WriteByte(MSG_MULTICAST, EVENT_UPDATEV2MODEL);
@ -164,12 +164,12 @@ void(string to, float skin) UpdateV2model =
msg_entity = self;
multicast('0 0 0', MULTICAST_ONE);
#endif // PC
#endif // FTE
}
void(float index, float state) ChangeReviveIconState =
{
#ifdef PC
#ifdef FTE
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
WriteByte(MSG_MULTICAST, EVENT_REVIVECHANGE);
@ -177,12 +177,12 @@ void(float index, float state) ChangeReviveIconState =
WriteByte(MSG_MULTICAST, state);
multicast('0 0 0', MULTICAST_ALL);
#endif // PC
#endif // FTE
}
void(float index, vector org) EnableReviveIcon =
{
#ifdef PC
#ifdef FTE
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
WriteByte(MSG_MULTICAST, EVENT_REVIVEON);
@ -192,24 +192,24 @@ void(float index, vector org) EnableReviveIcon =
WriteCoord(MSG_MULTICAST, org_z);
multicast('0 0 0', MULTICAST_ALL);
#endif // PC
#endif // FTE
}
void(float index) DisableReviveIcon =
{
#ifdef PC
#ifdef FTE
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
WriteByte(MSG_MULTICAST, EVENT_REVIVEOFF);
WriteByte(MSG_MULTICAST, index);
multicast('0 0 0', MULTICAST_ALL);
#endif // PC
#endif // FTE
}
void(entity who, float broadcast_time, float type, string str) BroadcastMessageToClient =
{
#ifdef PC
#ifdef FTE
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
WriteByte(MSG_MULTICAST, EVENT_BROADCAST);
@ -219,12 +219,12 @@ void(entity who, float broadcast_time, float type, string str) BroadcastMessageT
msg_entity = who;
multicast('0 0 0', MULTICAST_ONE);
#endif // PC
#endif // FTE
}
void(float broadcast_time, float type, string str) BroadcastMessage =
{
#ifdef PC
#ifdef FTE
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
WriteByte(MSG_MULTICAST, EVENT_BROADCAST);
@ -233,12 +233,12 @@ void(float broadcast_time, float type, string str) BroadcastMessage =
WriteString(MSG_MULTICAST, str);
multicast('0 0 0', MULTICAST_ALL);
#endif // PC
#endif // FTE
}
void(float playernum, float points, float am, float kills, string name, entity person) UpdatePlayerPoints =
{
#ifdef PC
#ifdef FTE
if (player_count == 0) {
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
@ -262,11 +262,11 @@ void(float playernum, float points, float am, float kills, string name, entity p
multicast('0 0 0', MULTICAST_ALL);
}
#endif // PC
#endif // FTE
}
void(float count) UpdatePlayerCount = {
#ifdef PC
#ifdef FTE
if (count == 0)
return;
else {
@ -276,12 +276,12 @@ void(float count) UpdatePlayerCount = {
multicast('0 0 0', MULTICAST_ALL);
}
#endif // PC
#endif // FTE
}
void(float newtime, float newtype, entity change) PromptLevelChange =
{
#ifdef PC
#ifdef FTE
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
WriteByte(MSG_MULTICAST, EVENT_BLACKOUT);
@ -290,12 +290,12 @@ void(float newtime, float newtype, entity change) PromptLevelChange =
msg_entity = change;
multicast('0 0 0', MULTICAST_ONE);
#endif // PC
#endif // FTE
}
void(entity who) UpdatePunchangle =
{
#ifdef PC
#ifdef FTE
// naievil -- shit logic lol...but result looks clean as fuck...
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
@ -338,10 +338,10 @@ void(entity who) UpdatePunchangle =
} else
who.punchangle_z = 0;
#endif // PC
#endif // FTE
}
#ifdef PC
#ifdef FTE
void(string h, float h2, entity who) pushHUD = {
if (player_count == 0) {
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
@ -430,25 +430,23 @@ void(string chaptertitle, string location, string date, string person, entity wh
multicast('0 0 0', MULTICAST_ALL);
}
}
#endif // PC
#endif // FTE
void (float achievement_id, optional entity who) GiveAchievement =
{
//#ifndef QUAKESPASM
#ifndef PC
#ifndef FTE
// temp
if (achievement_id > 4)
return;
#endif // PC
#endif // FTE
// this is an achievement specific to an individual
if ((who && who != world) || player_count == 0) {
if (player_count == 0) who = find(world, classname, "player");
#ifndef PC
#ifndef FTE
achievement(who, achievement_id);
@ -460,11 +458,11 @@ void (float achievement_id, optional entity who) GiveAchievement =
msg_entity = who;
multicast('0 0 0', MULTICAST_ONE);
#endif // PC
#endif // FTE
} else {
#ifndef PC
#ifndef FTE
entity players;
players = find(world, classname, "player");
@ -480,29 +478,26 @@ void (float achievement_id, optional entity who) GiveAchievement =
WriteByte(MSG_MULTICAST, achievement_id);
multicast('0 0 0', MULTICAST_ALL);
#endif // PC
#endif // FTE
}
//#endif // QUAKESPASM
}
void (float achievement_id, float progress_value, optional entity who) UpdateAchievementProgress =
{
//#ifndef QUAKESPASM
#ifndef PC
#ifndef FTE
// temp
if (achievement_id > 4)
return;
#endif // PC
#endif // FTE
// this is a progress update specific to an individual
if ((who && who != world) || player_count == 0) {
if (player_count == 0) who = find(world, classname, "player");
#ifndef PC
#ifndef FTE
//achievement_progress(who, achievement_id, progress_value);
@ -515,11 +510,11 @@ void (float achievement_id, float progress_value, optional entity who) UpdateAch
msg_entity = who;
multicast('0 0 0', MULTICAST_ONE);
#endif // PC
#endif // FTE
} else {
#ifndef PC
#ifndef FTE
entity players;
players = find(world, classname, "player");
@ -536,9 +531,9 @@ void (float achievement_id, float progress_value, optional entity who) UpdateAch
WriteFloat(MSG_MULTICAST, progress_value);
multicast('0 0 0', MULTICAST_ALL);
#endif // PC
#endif // FTE
}
//#endif // QUAKESPASM
}
// *****************************************
@ -559,11 +554,11 @@ float(entity who, entity target) isFacing =
float difference_angle = target_angle - who_angle;
#ifdef HANDHELD
#ifndef FTE
if (difference_angle < -45) {
difference_angle += 360;
}
#endif
#endif
// 180 = directly facing each other, 30 degree buffer.
if (difference_angle <= 210 && difference_angle >= 150)

View file

@ -38,11 +38,17 @@ void() EndGame_Restart =
void() EndGame_FadePrompt =
{
PromptLevelChange(time + 6, 2, self);
#ifdef PC
#ifdef FTE
self.think = EndGame_Restart;
#else
#else
self.think = Soft_Restart;
#endif
#endif // FTE
self.nextthink = time + 5;
}

View file

@ -25,11 +25,9 @@
*/
#ifndef QUAKESPASM
#ifndef HANDHELD
#ifndef STANDARD
#pragma target FTE
#endif // HANDHELD
#endif // QUAKESPASM
#endif // STANDARD
#define true 1
#define false 0
@ -46,15 +44,15 @@ float framecount;
float deathmatch;
float coop;
#ifndef PC
#ifndef FTE
void(string com) SV_ParseClientCommand;
.float gravity;
.float recoil_delay;
#ifndef HANDHELD
.float mapversion;
#endif
.float ammo;
#endif
#endif // FTE
// achievement tracking
.float ach_tracker_npnp;
@ -91,9 +89,12 @@ void(entity person, float expamt , float doublepoint) addmoney;
.float score;
.float kills;
.float headshots;
#ifdef PC
#ifdef FTE
.float facingenemy;
#endif
#endif // FTE
//doors
.float state;
@ -106,9 +107,12 @@ void(entity person, float expamt , float doublepoint) addmoney;
.float requirespower;
//player funcs
#ifdef PC
#ifdef FTE
.float zoom;
#endif
#endif // FTE
.float damage_timer; // Used for time-based damage infliction such as Traps.
.float speed_penalty; // A multiplier for limiting player speed. Also
@ -229,11 +233,16 @@ void() SUB_Null2 = {};
#define VEC_VIEW_OFS '0 0 32'
#ifndef HANDHELD
#define MAX_ZOMB 24
// FIXME: Limits Quakespasm to 12 zombies lol
#ifdef FTE
#define MAX_ZOMB 24
#else
#define MAX_ZOMB 12
#endif // HANDHELD
#define MAX_ZOMB 12
#endif // FTE
vector trace_plane_normal;
@ -386,11 +395,14 @@ entity boxLocations[32];
float boxCount;
vector boxOrigin;
#ifdef PC
#ifdef FTE
//powerups
.float x2_icon;
.float insta_icon;
#endif // PC
#endif // FTE
.string powerup_vo;
float instakill_finished;
float insta_blink;
@ -456,7 +468,8 @@ typedef struct
#define SET_OPEN 1
#define SET_CLOSED 2
#ifdef PC
#ifdef FTE
waypoint_ai waypoints[MAX_WAYPOINTS];
// fog
@ -464,7 +477,8 @@ string world_fog;
// lights
#define EF_PURPLELIGHT 256 // fte already has some effect styles defined...
#endif
#endif // FTE
#define UT_HUD 1
#define UT_ROUNDS_CHANGE 2
@ -525,9 +539,8 @@ float sndActivCnt;
.vector bbmins, bbmaxs;
.float currentHitBoxSetup;
#ifdef QUAKESPASM
.float sprintflag;
#endif
// PC Fog force
.float PC_fog;

View file

@ -1,542 +0,0 @@
/*
+----+
|Defs|
+----+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
| Scratch Http://www.admdev.com/scratch |
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
| This contains necessary definitions from the original V1.06 defs.qc file. |
| This includes some basic constants, the built in function definitions, and |
| some variable's used by the Quake Engine internally. |
| Certain lines in this file are hardcoded into Quake engine, and -must- be |
| present and unchanged, in the order they are shown. Otherwise Quake will |
| refuse to run. |
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
*/
#define HANDHELD
// These lines CANNOT be altered/moved
entity self;
entity other;
entity world;
float time;
float frametime;
float force_retouch; // force all entities to touch triggers
string mapname;
float deathmatch;
float coop;
float teamplay;
float serverflags; // propagated from level to level, used to
float rounds;
float rounds_change;
float parm1, parm2, parm3, parm4, parm5, parm6, parm7, parm8, parm9, parm10, parm11, parm12, parm13, parm14, parm15, parm16;
vector v_forward, v_up, v_right; // set by makevectors()
float trace_allsolid;
float trace_startsolid;
float trace_fraction;
vector trace_endpos;
vector trace_plane_normal;
float trace_plane_dist;
entity trace_ent;
float trace_inopen;
float trace_inwater;
entity msg_entity; // destination of single entity writes
void() main; // only for testing
void() StartFrame;
void() EndFrame;
void() PlayerPreThink;
void() PlayerPostThink;
void() ClientKill;
void() ClientConnect;
void() PutClientInServer; // call after setting the parm1... parms
void() ClientDisconnect;
void() SetNewParms; // called when a client first connects to
void() SetChangeParms; // call to set parms for self so they can
void() ParseClientCommand; // special command calls
string CMD_STRING;
void() Soft_Restart;
void end_sys_globals; // flag for structure dumping
.float modelindex; // *** model index in the precached list
.vector absmin, absmax; // *** origin + mins / maxs
.float ltime; // local time for entity
.float movetype;
.float solid;
.vector origin; // ***
.vector oldorigin; // ***
.vector velocity;
.vector angles;
.vector avelocity;
.vector punchangle; // temp angle adjust from damage or recoil
.string classname; // spawn function
.string model;
.float frame;
.float skin;
.float iframetime;
.float effects;
.vector mins, maxs; // bounding box extents reletive to origin
.vector size; // maxs - mins
.void() touch;
.void() use;
.void() think;
.void() blocked; // for doors or plats, called when can't push other
.float nextthink;
.entity groundentity;
.float health;
.float points;
.float kills;
.float weapon; // one of the W_COLT, etc flags
.string weaponmodel;
.string weapon2model;
.float weaponframe;
.float weapon2frame;
.float currentammo;
.float currentmag;
.float zoom;
.float weaponskin;
.float weapon2skin;
.float primary_grenades;
.float secondary_grenades;
.float grenades;
.float perks; // bit flags
.float takedamage;
.entity chain;
.float deadflag;
.vector view_ofs; // add to origin to get eye point
.float button0; //
.float button1; //
.float button2; //
.float button3; //
.float button4; //
.float button5; //
.float button6; //
.float button7; //
.float button8; //
.float impulse; // weapon changes
.float fixangle;
.vector v_angle; // view / targeting angle for players
.float idealpitch; // calculated pitch angle for lookup up slopes
.string netname;
.entity enemy;
.float flags;
.float colormap;
.float team;
.float max_health; // players maximum health is stored here
.float teleport_time; // don't back up
.float waterlevel; // 0 = not in, 1 = feet, 2 = wast, 3 = eyes
.float watertype; // a contents value
.float ideal_yaw;
.float yaw_speed;
.entity aiment;
.entity head;
.entity larm;
.entity rarm;
.entity goalentity; // a movetarget or an enemy
//.entity goalorigin; // a movetarget location
.float spawnflags;
.string target;
.string targetname;
.float bleed_out;
.float progress_bar;
.entity dmg_inflictor;
.entity owner; // who launched a missile
.vector movedir; // mostly for doors, but also used for waterjump
.string message; // trigger messages
.float sounds; // either a cd track number or sound number
.string noise, noise1, noise2, noise3; // contains names of wavs to play
.float x2_icon; // double points icon
.float insta_icon;
.vector ADS_Offset;
.vector Flash_Offset;
.float Flash_Size;
.string Weapon_Name;
.string Weapon_Name_Touch;
.float currentmag2;
.float maxspeed;
.float facingenemy;
//.float scale;
void end_sys_fields; // flag for structure dumping
// End. Lines below this MAY be altered, to some extent
// Built In functions
void(vector ang) makevectors = #1; // sets v_forward, etc globals
void(entity e, vector o) setorigin = #2;
void(entity e, string m) setmodel = #3; // set movetype and solid first
void(entity e, vector min, vector max) setsize = #4;
void() break = #6;
float() random = #7; // returns 0 - 1
void(entity e, float chan, string samp, float vol, float atten) sound = #8;
vector(vector v) normalize = #9;
void(string e) error = #10;
void(string e) objerror = #11;
float(vector v) vlen = #12;
float(vector v) vectoyaw = #13;
entity() spawn = #14;
void(entity e) remove = #15;
void(vector v1, vector v2, float nomonsters, entity forent) traceline = #16;
entity() checkclient = #17; // returns a client to look for
entity(entity start, .string fld, string match) find = #18;
string(string s) precache_sound = #19;
string(string s) precache_model = #20;
void(entity client, string s)stuffcmd = #21;
entity(vector org, float rad) findradius = #22;
void(string s) dprint = #25;
string(float f) ftos = #26;
string(vector v) vtos = #27;
void() coredump = #28; // prints all edicts
void() traceon = #29; // turns statment trace on
void() traceoff = #30;
void(entity e) eprint = #31; // prints an entire edict
float(float yaw, float dist) walkmove = #32; // returns TRUE or FALSE
float(entity zombie, float which, entity limb) updateLimb = #33;
float(float yaw, float dist) droptofloor = #34; // TRUE if landed on floor
void(float style, string value) lightstyle = #35;
float(float v) rint = #36; // round to nearest int
float(float v) floor = #37; // largest integer <= v
float(float v) ceil = #38; // smallest integer >= v
float(entity e) checkbottom = #40; // true if self is on ground
float(vector v) pointcontents = #41; // returns a CONTENT_*
float(float f) fabs = #43;
vector(entity e, float speed) aim = #44; // returns the shooting vector
float(string s) cvar = #45; // return cvar.value
void(string s) localcmd = #46; // put string into local que
entity(entity e) nextent = #47; // for looping through all ents
void() ChangeYaw = #49; // turn towards self.ideal_yaw
float(string name) getSoundLen = #50;
vector(vector v) vectoangles = #51;
void(float to, float f) WriteByte = #52;
void(float to, float f) WriteChar = #53;
void(float to, float f) WriteShort = #54;
void(float to, float f) WriteLong = #55;
void(float to, float f) WriteCoord = #56;
void(float to, float f) WriteAngle = #57;
void(float to, string s) WriteString = #58;
void(float to, entity s) WriteEntity = #59;
string(entity s) etos = #65;
void(float step) movetogoal = #67;
string(string s) precache_file = #68; // no effect except for -copy
void(entity e) makestatic = #69;
void(string s) changelevel = #70;
void(float step, vector origin) movetoorigin = #71;
void(string var, string val) cvar_set = #72; // sets cvar.value
void(entity client, string s) centerprint = #73; // sprint, but in middle
void(entity client, string s, string s) centerprint2 = #73;
void(entity client, string s, string s, string s) centerprint3 = #73;
void(entity client, string s, string s, string s, string s) centerprint4 = #73;
void(entity client, string s, string s, string s, string s, string s) centerprint5 = #73;
void(entity client, string s, string s, string s, string s, string s, string s) centerprint6 = #73;
void(entity client, string s, string s, string s, string s, string s, string s, string s) centerprint7 = #73;
void(vector pos, string samp, float vol, float atten) ambientsound = #74;
string(string s) precache_model2 = #75; // registered version only
string(string s) precache_sound2 = #76; // registered version only
string(string s) precache_file2 = #77; // registered version only
void(entity e) setspawnparms = #78; // set parm1... to the
void(vector start, vector min, vector max, vector end, float nomonsters, entity forent) tracebox = #90;
float(vector start, vector min, vector max, vector end, float nomonsters, entity forent) tracemove = #99;
entity (entity start, .float field, float match) findfloat = #98;
float(string s) stof = #81; // 2001-09-20 QuakeC string manipulation by FrikaC
vector(entity what) Get_Waypoint_Near = #83;
float(entity zombie, entity target) Do_Pathfind_psp = #84;
void(string s) Open_Waypoint = #85;
vector(entity zombie,vector start,vector min, vector max) Get_Next_Waypoint = #86;
void(entity client, float type, float cost, float weapon) useprint = #87;
vector(entity zombie,vector start,vector min, vector max) Get_First_Waypoint = #88;
void(string s) Close_Waypoint = #89;
void(entity plr, float achievement) achievement = #79;
void(string trackname) songegg = #500;
void() nzp_maxammo = #501;
/*
type 0 = clear
type 1 = buy door
type 2 = buy debris
type 3 = Buy ammo
type 4 = buy weapon
type 5 = repair window
type 6 = use box
type 7 = use trap
type 8 = require power
*/
// 2001-09-20 QuakeC file access by FrikaC start
float(string filename, float mode) fopen = #110;
void(float fhandle) fclose = #111;
string(float fhandle) fgets = #112;
void(float fhandle, string s) fputs = #113;
// 2001-09-20 QuakeC file access by FrikaC end
// 2001-09-20 QuakeC string manipulation by FrikaC start
float(string s) strlen = #114;
string(string s1, string s2) strcat = #115;
string(string s, float start, float length) substring = #116;
vector(string s) stov = #117;
string(string s) strzone = #118;
string(string s) strunzone = #119;
string(string s) strtrim = #120;
// 2001-09-20 QuakeC string manipulation by FrikaC end
// 2001-11-15 DarkPlaces general builtin functions by Lord Havoc start
float(string s) tokenize = #441;
string(float num) argv = #442;
// 2001-11-15 DarkPlaces general builtin functions by Lord Havoc end
//
// constants
//
#define FALSE 0
#define TRUE 1
// edict.flags
#define FL_FLY 1
#define FL_SWIM 2
#define FL_CLIENT 8 // set for all client edicts
#define FL_INWATER 16 // for enter / leave water splash
#define FL_MONSTER 32
#define FL_GODMODE 64 // player cheat
#define FL_NOTARGET 128 // player cheat
#define FL_ITEM 256 // extra wide size for bonus items
#define FL_ONGROUND 512 // standing on something
#define FL_PARTIALGROUND 1024 // not all corners are valid
#define FL_WATERJUMP 2048 // player jumping out of water
//#define FL_JUMPRELEASED 4096 // for jump debouncing
// edict.movetype values
#define MOVETYPE_NONE 0 // never moves
#define MOVETYPE_ANGLENOCLIP 1
#define MOVETYPE_ANGLECLIP 2
#define MOVETYPE_WALK 3 // players only
#define MOVETYPE_STEP 4 // discrete, not real time unless fall
#define MOVETYPE_FLY 5
#define MOVETYPE_TOSS 6 // gravity
#define MOVETYPE_PUSH 7 // no clip to world, push and crush
#define MOVETYPE_NOCLIP 8
#define MOVETYPE_FLYMISSILE 9 // fly with extra size against monsters
#define MOVETYPE_BOUNCE 10
#define MOVETYPE_BOUNCEMISSILE 11 // bounce with extra size
#define MOVETYPE_FOLLOW 12
// edict.solid values
#define SOLID_NOT 0 // no interaction with other objects
#define SOLID_TRIGGER 1 // touch on edge, but not blocking
#define SOLID_BBOX 2 // touch on edge, block
#define SOLID_SLIDEBOX 3 // touch on edge, but not an onground
#define SOLID_BSP 4 // bsp clip, touch on edge, block
#define SOLID_CORPSE 5 // bsp clip, touch on edge, block
// range values
#define RANGE_MELEE 0
#define RANGE_NEAR 1
#define RANGE_MID 2
#define RANGE_FAR 3
// deadflag values
#define DEAD_NO 0
#define DEAD_DYING 1
#define DEAD_DEAD 2
#define DEAD_RESPAWNABLE 3
// takedamage values
#define DAMAGE_NO 0
#define DAMAGE_YES 1
#define DAMAGE_AIM 2
#define DAMAGE_NOMARKER 3
/*.void() th_stand;
.void() th_walk;
.void() th_run;
.void(entity attacker, float damage) th_pain;*/
.void() th_die;
//.void() th_missile;
.void() th_melee;
// point content values
#define CONTENT_EMPTY -1
#define CONTENT_SOLID -2
#define CONTENT_WATER -3
#define CONTENT_SLIME -4
#define CONTENT_LAVA -5
#define CONTENT_SKY -6
#define VEC_ORIGIN '0 0 0'
//Standard Quake View Offset
//vector VEC_VIEW_OFS = '0 0 22';
//Half Life View Offset is 64
//64 units above ground, for our purposes it's, 64 - (how low bounding box goes)
//vector VEC_VIEW_OFS = '0 0 32';
//Standard Quake Hull
//vector VEC_HULL_MIN = '-16 -16 -24';
//vector VEC_HULL_MAX = '16 16 32';
//Half Life 1 Hull Sizes ADDED BY BLUBS, COMMENTED ORIGINAL QUAKE BBOX SIZS OUT
#define VEC_HULL_MIN '-16 -16 -32'
#define VEC_HULL_MAX '16 16 40'
#define VEC_HULL2_MIN '-32 -32 -24'
#define VEC_HULL2_MAX '32 32 64'
// protocol bytes
#define SVC_BAD 0
#define SVC_NOP 1
#define SVC_DISCONNECT 2
#define SVC_UPDATESTAT 3
#define SVC_VERSION 4
#define SVC_SETVIEW 5
#define SVC_SOUND 6
#define SVC_TIME 7
#define SVC_PRINT 8
#define SVC_STUFFTEXT 9
#define SVC_SETANGLE 10
#define SVC_SERVERINFO 11
#define SVC_LIGHTSTYLE 12
#define SVC_UPDATENAME 13
#define SVC_UPDATEPOINTS 14
#define SVC_CLIENTDATA 15
#define SVC_STOPSOUND 16
#define SVC_PARTICLE 18
#define SVC_DAMAGE 19
#define SVC_SPAWNSTATIC 20
#define SVC_SPAWNBINARY 21
#define SVC_SPAWNBASELINE 22
#define SVC_TEMPENTITY 23
#define SVC_SETPAUSE 24
#define SVC_SIGNONNUM 25
#define SVC_CENTERPRINT 26
#define SVC_SPAWNSTATICSOUND 29 // 1998-08-08 Complete SVC list by Zhenga
#define SVC_INTERMISSION 30
#define SVC_FINALE 31
#define SVC_CDTRACK 32
#define SVC_SELLSCREEN 33
#define SVC_CUTSCENE 34 // 1998-08-08 Complete SVC list by Zhenga
#define SVC_WEAPONFIRE 35
#define SVC_HITMARK 36
#define SVC_USEPRINT 38
#define TE_SPIKE 0
#define TE_SUPERSPIKE 1
#define TE_GUNSHOT 2
#define TE_EXPLOSION 3
#define TE_TAREXPLOSION 4
#define TE_LIGHTNING1 5
#define TE_LIGHTNING2 6
#define TE_WIZSPIKE 7
#define TE_KNIGHTSPIKE 8
#define TE_LIGHTNING3 9
#define TE_LAVASPLASH 10
#define TE_TELEPORT 11
#define TE_RAYSPLASHGREEN 14
#define TE_RAYSPLASHRED 15
// sound channels
// channel 0 never willingly overrides
// other channels (1-7) allways override a playing sound on that channel
#define CHAN_AUTO 0
#define CHAN_WEAPON 1
#define CHAN_VOICE 2
#define CHAN_ITEM 3
#define CHAN_BODY 4
//Player uses channel 5 for all weapon reload sfx
#define ATTN_NONE 0
#define ATTN_NORM 1
#define ATTN_IDLE 2
#define ATTN_STATIC 3
// update types
#define UPDATE_GENERAL 0
#define UPDATE_STATIC 1
#define UPDATE_BINARY 2
#define UPDATE_TEMP 3
// entity effects
#define EF_BLUE 1
#define EF_MUZZLEFLASH 2
#define EF_BRIGHTLIGHT 4
#define EF_RED 8
#define EF_ORANGELIGHT 16
#define EF_GREEN 32
#define EF_LIGHT 64
#define EF_NODRAW 128
#define EF_BRIGHTFIELD 256
#define EF_FULLBRIGHT 512
#define EF_DARKLIGHT 1024
#define EF_DARKFIELD 2048
#define EF_PURPLELIGHT 4096
#define EF_RAYRED 8196
#define EF_RAYGREEN 16384
// messages
#define MSG_BROADCAST 0 // unreliable to all
#define MSG_ONE 1 // reliable to one (msg_entity)
#define MSG_ALL 2 // reliable to all
#define MSG_INIT 3 // write to the init string
#define AS_STRAIGHT 1
#define AS_SLIDING 2
#define AS_MELEE 3
#define AS_MISSILE 4
// Quake assumes these are defined.
//.string wad, map;
.float /*worldtype,*/ delay, wait, lip, /*light_lev,*/ speed, style/*, skill*/;
.string killtarget;
.void() think1;
.vector finaldest;
.vector pos1, pos2/*, mangle*/;
void(vector o, vector d, float color, float count) particle = #48;// start a particle effect
void(string s) bprint_psp = #23;
void(entity client, string s) sprint_psp = #24;
// End
void(string s) println = {bprint_psp(s);} //just when brain decided to think this is c
void(float ignore, string s) bprint = {bprint_psp(s);};
void(entity client, float type, string s) sprint = {sprint_psp(client, s);};
void(string s) print = {bprint_psp(s);};
//doors
.float state;
#define STATE_TOP 0
#define STATE_BOTTOM 1
#define STATE_UP 2
#define STATE_DOWN 3
string mappath;
#define PRINT_HIGH 0
.float isspec;
#define FILE_READ 0
#define FILE_APPEND 1
#define FILE_WRITE 2
#define MOVE_HITMODEL 0 // must be different for this engine!
.float recoil_delay;
.float gravity;
.float renderamt;
.float rendermode;
.vector rendercolor;
.string mapversion;
.float ammo;
void(string com) SV_ParseClientCommand;
.float currentHitBoxSetup;
.vector bbmins, bbmaxs; // Used for zombie hitboxes
.float achievements;

View file

@ -13,7 +13,7 @@
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
*/
#define QUAKESPASM
#define STANDARD
// These lines CANNOT be altered/moved
entity self;
@ -123,8 +123,6 @@ void end_sys_globals; // flag for structure dumping
.float team;
.float max_health; // players maximum health is stored here
.float teleport_time; // don't back up
.float armortype;
.float armorvalue;
.float waterlevel; // 0 = not in, 1 = feet, 2 = wast, 3 = eyes
.float watertype; // a contents value
.float ideal_yaw;
@ -138,8 +136,6 @@ void end_sys_globals; // flag for structure dumping
.float spawnflags;
.string target;
.string targetname;
//.float dmg_take;
//.float dmg_save;
.float bleed_out;
.float progress_bar;
.entity dmg_inflictor;
@ -150,15 +146,14 @@ void end_sys_globals; // flag for structure dumping
.string noise, noise1, noise2, noise3; // contains names of wavs to play
.float x2_icon; // double points icon
.float insta_icon;
.string Weapon_Name;
.string Weapon_Name_Touch;
.vector ADS_Offset;
.vector Flash_Offset;
.float Flash_Size;
.string Weapon_Name;
.string Weapon_Name_Touch;
.float currentmag2;
.float maxspeed;
.float facingenemy;
.float renderGrayscale;
//.float scale;
void end_sys_fields; // flag for structure dumping
// End. Lines below this MAY be altered, to some extent
@ -240,9 +235,8 @@ string (string s)
string (string s) precache_file2 = #77; // registered version only
void (entity e) setspawnparms = #78; // set parm1... to the
void (entity plr, float achievement) achievement = #79;
//void (entity killer, entity killee) logfrag = #79; // add to stats
float (string s) stof = #81; // 2001-09-20 QuakeC string manipulation by FrikaC
void (vector where, float set) multicast = #82;
//void (vector where, float set) multicast = #82;
vector (entity what) Get_Waypoint_Near = #83;
float (entity zombie, entity target) Do_Pathfind_psp = #84;
void (string s) Open_Waypoint = #85;
@ -385,8 +379,6 @@ void ()
#define SVC_SETPAUSE 24
#define SVC_SIGNONNUM 25
#define SVC_CENTERPRINT 26
#define SVC_KILLEDMONSTER 27
#define SVC_FOUNDSECRET 28
#define SVC_SPAWNSTATICSOUND 29 // 1998-08-08 Complete SVC list by Zhenga
#define SVC_INTERMISSION 30
#define SVC_FINALE 31
@ -396,9 +388,6 @@ void ()
#define SVC_WEAPONFIRE 35
#define SVC_HITMARK 36
#define SVC_USEPRINT 38
#define SVC_MUZZLEFLASH 39
#define SVC_SONGEGG 45 // 45
#define SVC_MAXAMMO 46 // 46
#define SVC_LIMBUPDATE 51 // naievil -- keep me
#define SVC_BSPDECAL 50 // naievil -- keep me
#define SVC_ACHIEVEMENT 52

View file

@ -77,9 +77,11 @@ void() change_frame =
self.nextthink = time + 1;
}
#ifndef PC
#ifndef FTE
void LoadWaypointData() = {};
#endif
#endif // FTE
// Old Demo defs
.float fogdogs;

View file

@ -1,51 +0,0 @@
/*
server/dummies/generic.qc
dummys for quakespasm
Copyright (C) 2021 NZ:P Team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
*/
// Dummys that should be here
void print(string s) = {};
#define MOVE_HITMODEL 0
void() LoadWaypointData = {};
void () CL_SendWeaponFire =
{
float return_time;
vector Wep_Recoil;
Wep_Recoil = GetWeaponRecoil(self.weapon);
msg_entity = self;
WriteByte(MSG_ONE, SVC_WEAPONFIRE);
return_time = getWeaponRecoilReturn(self.weapon);
WriteLong(MSG_ONE, return_time);
WriteCoord (MSG_ONE, Wep_Recoil_x);
WriteCoord (MSG_ONE, Wep_Recoil_y);
WriteCoord (MSG_ONE, Wep_Recoil_z);
//self.punchangle = Wep_Recoil;
self.recoil_delay = 60/return_time + time;
}

View file

@ -161,9 +161,12 @@ void() door_go_up =
else
SUB_CalcMove (self.pos2, self.speed, door_hit_top);
#ifndef PC
#ifndef FTE
Open_Waypoint(self.wayTarget);
#endif
#endif // FTE
SUB_UseTargets();
};
@ -595,14 +598,19 @@ void() func_door =
self.think = LinkDoors;
self.nextthink = self.ltime + 0.1;
#ifdef PC
#ifdef FTE
HalfLife_DoRender();
#endif
#endif // FTE
};
void() func_door_nzp =
{
#ifndef PC
#ifndef FTE
if (!self.renderamt)
self.renderamt = 255;
@ -617,7 +625,8 @@ void() func_door_nzp =
if (!self.ammo)
self.ammo = 0; //thease are just here because they can be sp there is no error message. serve no real purpose
#endif
#endif // FTE
// naievil (FIXME) ^^^^ hl rendermodes, mapversion
makevectors(self.angles);
@ -695,7 +704,10 @@ void() func_door_nzp =
self.think = LinkDoors;
self.nextthink = self.ltime + 0.1;
#ifdef PC
#ifdef FTE
HalfLife_DoRender();
#endif
#endif // FTE
};

View file

@ -34,9 +34,11 @@ void() Barrel_Explode =
sound (self, CHAN_WEAPON, self.oldmodel, 1, ATTN_NORM);
DamgageExplode (self, self.enemy, 1, 250, 250);
#ifdef PC
#ifdef FTE
te_customflash(self.origin, 128, 300, '1 1 1');
#endif
#endif // FTE
CallExplosion(self.origin);
@ -51,11 +53,17 @@ void() Barrel_Think =
{
// Spawn the flame particles
if (self.ltime > 10) {
#ifndef PC
#ifndef FTE
particle (self.origin, v_up, 111, 0);
#else
#else
te_flamejet(self.origin + '0 0 45', v_up, 10);
#endif
#endif // FTE
self.ltime = 0;
}
self.ltime++;

View file

@ -102,7 +102,9 @@ void() light_flame_small_white = // Light with small flame & fire sound
// Spawnable Dynamic Lights
// --------------------
//
#ifdef PC
#ifdef FTE
void(entity what, float fullbright, float light_level,
float red, float green, float blue) Light_Custom =
{
@ -117,4 +119,5 @@ void(entity what, float fullbright, float light_level,
what.color_z = blue;
}
}
#endif
#endif // FTE

View file

@ -44,9 +44,13 @@ void() mystery_touch;
void(entity e) Light_Red =
{
e.effects = e.effects | EF_FULLBRIGHT;
#ifndef PC
#ifndef FTE
e.effects = e.effects | EF_RED;
#else
#else
{
e.pflags = PFLAGS_FULLDYNAMIC;
e.light_lev = 100;
@ -54,7 +58,9 @@ void(entity e) Light_Red =
e.color_y = 0.25;
e.color_z = 0.25;
}
#endif
#endif // FTE
}
//
@ -64,9 +70,13 @@ void(entity e) Light_Red =
void(entity e) Light_Green =
{
e.effects = e.effects | EF_FULLBRIGHT;
#ifndef PC
#ifndef FTE
e.effects = e.effects | EF_GREEN;
#else
#else
{
e.pflags = PFLAGS_FULLDYNAMIC;
e.light_lev = 100;
@ -74,7 +84,9 @@ void(entity e) Light_Green =
e.color_y = 2;
e.color_z = 0.25;
}
#endif
#endif // FTE
}
//
@ -84,9 +96,13 @@ void(entity e) Light_Green =
void(entity e) Light_Blue =
{
e.effects = e.effects | EF_FULLBRIGHT;
#ifndef PC
#ifndef FTE
e.effects = e.effects | EF_BLUE;
#else
#else
{
e.pflags = PFLAGS_FULLDYNAMIC;
e.light_lev = 100;
@ -94,7 +110,9 @@ void(entity e) Light_Blue =
e.color_y = 0.25;
e.color_z = 2;
}
#endif
#endif // FTE
}
//
@ -104,9 +122,13 @@ void(entity e) Light_Blue =
void(entity e) Light_Orange =
{
e.effects = e.effects | EF_FULLBRIGHT;
#ifndef PC
#ifndef FTE
e.effects = e.effects | EF_ORANGELIGHT;
#else
#else
{
e.pflags = PFLAGS_FULLDYNAMIC;
e.light_lev = 100;
@ -114,7 +136,9 @@ void(entity e) Light_Orange =
e.color_y = 1;
e.color_z = 0;
}
#endif
#endif // FTE
}
//
@ -124,9 +148,13 @@ void(entity e) Light_Orange =
void(entity e) Light_Purple =
{
e.effects = e.effects | EF_FULLBRIGHT;
#ifndef PC
#ifndef FTE
e.effects = e.effects | EF_PURPLELIGHT;
#else
#else
{
e.pflags = PFLAGS_FULLDYNAMIC;
e.light_lev = 100;
@ -134,7 +162,9 @@ void(entity e) Light_Purple =
e.color_y = 0.25;
e.color_z = 2;
}
#endif
#endif // FTE
}
//
@ -144,7 +174,9 @@ void(entity e) Light_Purple =
void(entity e) Light_None =
{
e.effects = 0;
#ifdef PC
#ifdef FTE
{
e.pflags = 0;
e.light_lev = 0;
@ -152,7 +184,9 @@ void(entity e) Light_None =
e.color_y = 0;
e.color_z = 0;
}
#endif
#endif // FTE
}
//
@ -951,11 +985,6 @@ void() perk_deadshot =
self.think = setup_perk;
self.nextthink = time + 0.1;
// Different price on PC, for lack of Aim Assist
#ifdef PC
self.cost = self.cost2;
#endif
// Drink Information
self.sequence = 7;
self.style = P_DEAD;
@ -1596,11 +1625,14 @@ void() mystery_touch =
other.weapon2model = "";
}
#ifndef PC
#ifndef FTE
other.Flash_Offset = GetWeaponFlash_Offset(self.boxweapon.weapon);
other.Flash_Size = GetWeaponFlash_Size(self.boxweapon.weapon);
other.Weapon_Name = GetWeaponName(self.boxweapon.weapon);
#endif
#endif // FTE
}
else if (other.weapon == self.boxweapon.weapon)
{
@ -1624,11 +1656,15 @@ void() mystery_touch =
other.currentammo = getWeaponAmmo(self.boxweapon.weapon);
other.currentmag = getWeaponMag(self.boxweapon.weapon);
other.weaponskin = GetWepSkin(self.boxweapon.weapon);
#ifndef PC
#ifndef FTE
other.Flash_Offset = GetWeaponFlash_Offset(self.boxweapon.weapon);
other.Flash_Size = GetWeaponFlash_Size(self.boxweapon.weapon);
other.Weapon_Name = GetWeaponName(self.boxweapon.weapon);
#endif
#endif // FTE
}
else if (!other.thirdweapon && (other.perks & P_MULE))
{
@ -1854,9 +1890,11 @@ void PapUpgrade(entity pap, entity buyer) {
self.weapon2model = "";
UpdateV2model(self.weapon2model, 0);
#ifndef PC
#ifndef FTE
self.Weapon_Name = "";
#endif
#endif // FTE
self = tempe;
@ -1927,12 +1965,14 @@ void touch_pap() {
UpdateV2model(other.weapon2model, 0);
Set_W_Frame (startframe, endframe, 0, 0, 0, SUB_Null, modelname, true, S_BOTH);//FIXME
#ifndef PC
#ifndef FTE
self.Flash_Offset = GetWeaponFlash_Offset(self.weapon);
self.Flash_Size = GetWeaponFlash_Size(self.weapon);
self.Weapon_Name = GetWeaponName(self.weapon);
self.weaponskin = GetWepSkin(self.weapon);
#endif
#endif // FTE
self = tempe;

View file

@ -35,9 +35,12 @@ void() func_wall =
self.solid = SOLID_BSP;
setmodel (self, self.model);
#ifdef PC
#ifdef FTE
HalfLife_DoRender();
#endif
#endif // FTE
};
void() func_illusionary =
@ -47,10 +50,12 @@ void() func_illusionary =
self.solid = SOLID_NOT;
setmodel (self, self.model);
#ifdef PC
#ifdef FTE
HalfLife_DoRender();
#endif
// makestatic (self); // dr_mabuse1981: dont use makestatic, it doesnt show the HL rendermodes then.
#endif // FTE
};
// button and multiple button
@ -198,27 +203,42 @@ void() func_button =
self.pos1 = self.origin;
self.pos2 = self.pos1 + self.movedir*(fabs(self.movedir*self.size) - self.lip);
#ifdef PC
#ifdef FTE
HalfLife_DoRender();
#endif
#endif // FTE
};
void() flame_update = {
#ifndef PC
#ifndef FTE
particle (self.origin, v_up, 111, 0);
#else
#else
te_flamejet(self.origin, v_up, 10);
#endif
#endif // FTE
self.think = flame_update;
self.nextthink = time + random()+0.1;
}
void() place_fire =
{
#ifndef PC
#ifndef FTE
particle (self.origin, v_up*8, self.frame, 0);
#else
#else
te_flamejet(self.origin, v_up*8, 10);
#endif
#endif // FTE
self.think = flame_update;
self.nextthink = time + random()+0.1;
};
@ -237,9 +257,12 @@ void () buy_weapon_touch =
}
if (self.weapon != 99) {
#ifndef PC
#ifndef FTE
other.Weapon_Name_Touch = GetWeaponName(self.weapon);
#endif
#endif // FTE
float slot;
@ -301,9 +324,12 @@ void () buy_weapon_touch =
} else
// Universal Ammo buy
{
#ifndef PC
#ifndef FTE
other.Weapon_Name_Touch = GetWeaponName(other.weapon);
#endif
#endif // FTE
if (other.currentammo < getWeaponAmmo(other.weapon)) {
@ -514,11 +540,13 @@ void () buy_weapon_touch =
SwitchWeapon(self.weapon);
Set_W_Frame (startframe, endframe, 0, 0, 0, SUB_Null, modelname, false, S_BOTH);//FIXME
#ifndef PC
#ifndef FTE
self.Flash_Offset = GetWeaponFlash_Offset(self.weapon);
self.Flash_Size = GetWeaponFlash_Size(self.weapon);
self.Weapon_Name = GetWeaponName(self.weapon);
#endif
#endif // FTE
self = tempe;
}
@ -661,22 +689,7 @@ void() touch_songtrigger = {
}
void() trigger_song = {
#ifndef PC
remove(self);
#endif
precache_model(self.model);
precache_sound(self.tune);
self.movetype = MOVETYPE_NONE;
self.solid = SOLID_TRIGGER;
self.classname = "trigger_song";
setmodel(self, self.model);
setsize(self, VEC_HULL2_MIN, VEC_HULL2_MAX);
self.touch = touch_songtrigger;
sndTriggerCnt++;
}
/* ================

View file

@ -415,11 +415,17 @@ void() PU_MaxAmmo =
if (tempe.grenades & 2) tempe.secondary_grenades = 2;
// MAX AMMO! text
#ifdef PC
#ifdef FTE
ScrollText("MAX AMMO!", tempe);
#else
#else
nzp_maxammo();
#endif
#endif // FTE
tempe = find(tempe, classname, "player");
}
};

View file

@ -315,7 +315,8 @@ void() SUB_CalcMoveDone =
};
#ifdef PC
#ifdef FTE
//
// HalfLife_DoRender()
// Adds some support for HL rendermodes to FTE, made by
@ -364,4 +365,5 @@ void () HalfLife_DoRender =
}
}
};
#endif
#endif // FTE

View file

@ -125,7 +125,7 @@ void zapper_play () {
if (zents) {
#ifdef PC
#ifdef FTE
te_lightning2(self, self.origin, zents.origin);
@ -141,7 +141,7 @@ void zapper_play () {
WriteCoord (MSG_BROADCAST, targetorg_y);
WriteCoord (MSG_BROADCAST, targetorg_z);
#endif // PC
#endif // FTE
}

View file

@ -49,19 +49,10 @@ void() screen_shake =
zoom_factor = 0.5;
else
zoom_factor = 1;
#ifndef PC
self.enemy.punchangle_y = r * 8 * zoom_factor;
self.enemy.punchangle_x = (4 + (s * 4)) * zoom_factor;
#else
self.enemy.punchangle_y = r * 4 * zoom_factor;
self.enemy.punchangle_x = (4 + (s * 2)) * zoom_factor;
#endif // PC
};
void() Window_repaired =
@ -375,10 +366,13 @@ void() item_barricade =
setorigin(self, self.origin);
spawn_boxes();
#ifndef PC
#ifndef FTE
windows[wincnt] = self;
wincnt++;
#endif
#endif // FTE
};
void() item_cover = {item_barricade();};

View file

@ -128,13 +128,6 @@ void() precaches =
{
precache_model ("models/player.mdl");
#ifdef PC
if (world.song != "")
precache_sound (world.song);
#endif // PC
//
// Models
//
@ -187,13 +180,17 @@ void() precaches =
//
// player-made
#ifdef PC
#ifdef FTE
precache_sound("sounds/player/footstep1.wav");
precache_sound("sounds/player/footstep2.wav");
precache_sound("sounds/player/footstep3.wav");
precache_sound("sounds/player/footstep4.wav");
precache_sound("sounds/player/footstep5.wav");
#endif // PC
#endif // FTE
precache_sound("sounds/player/jump.wav");
precache_sound("sounds/player/land.wav");
precache_sound("sounds/player/pain4.wav");
@ -293,10 +290,13 @@ void() precaches =
// null
precache_sound("sounds/null.wav");
#ifdef PC
#ifdef FTE
// Moto -- FIXME: compile FTE to remove this engine sound request
precache_sound ("demon/dland2.wav");
#endif
#endif // FTE
}
//called when map loaded
@ -310,7 +310,8 @@ void() worldspawn =
// Init Power-Ups
PU_Init();
#ifdef PC
#ifdef FTE
clientstat(STAT_CURRENTMAG, EV_FLOAT, currentmag);
clientstat(STAT_CURRENTMAG2, EV_FLOAT, currentmag2);
clientstat(STAT_POINTS, EV_FLOAT, points);
@ -329,7 +330,8 @@ void() worldspawn =
clientstat(STAT_PLAYERSTANCE, EV_FLOAT, stance);
clientstat(STAT_FACINGENEMY, EV_FLOAT, facingenemy);
clientstat(STAT_VIEWZOOM, EV_FLOAT, viewzoom);
#endif
#endif // FTE
mappath = strcat("maps/", mapname);
mappath = strzone(mappath);

View file

@ -164,20 +164,6 @@ void(string weaponFile) nzd_defineweapon = {
CustomWeapons[wepnum].flashsize = stof(v);
}
#ifdef PC
/*sendCustomWeapon(wepnum, CustomWeapons[wepnum].name, CustomWeapons[wepnum].magSize,
CustomWeapons[wepnum].reserveSize, CustomWeapons[wepnum].vmodel, CustomWeapons[wepnum].vmodel2,
CustomWeapons[wepnum].gmodel, CustomWeapons[wepnum].isDual, CustomWeapons[wepnum].firetype,
CustomWeapons[wepnum].nonpap, CustomWeapons[wepnum].pap, CustomWeapons[wepnum].ispap,
CustomWeapons[wepnum].damage, CustomWeapons[wepnum].shotcount, CustomWeapons[wepnum].bodypen,
CustomWeapons[wepnum].penetration, CustomWeapons[wepnum].spread, CustomWeapons[wepnum].fdelay,
CustomWeapons[wepnum].rdelay, CustomWeapons[wepnum].walkspeed, CustomWeapons[wepnum].firesound,
CustomWeapons[wepnum].skin, CustomWeapons[wepnum].recoil, CustomWeapons[wepnum].crossmin,
CustomWeapons[wepnum].crossmax, CustomWeapons[wepnum].lowmag, CustomWeapons[wepnum].lowreserve,
CustomWeapons[wepnum].flash, CustomWeapons[wepnum].flashsize, CustomWeapons[wepnum].papWpn,
CustomWeapons[wepnum].adsofs);*/
#endif
break;
case 3:
if (line == "[") {

View file

@ -186,9 +186,12 @@ void() PlayerJump =
void(float override) JumpCheck =
{
#ifndef PC
#ifndef FTE
override = 0;
#endif
#endif // FTE
if(self.button2 || override) {
if (self.downed)
@ -225,7 +228,9 @@ void() PlayerPreThink =
} else {
self.maxspeed = 175;
if (self.sprinting) {
#ifdef PC
#ifdef FTE
if (self.viewzoom > 0.9)
self.viewzoom -= 0.015;
else if (self.viewzoom < 0.9)
@ -233,19 +238,25 @@ void() PlayerPreThink =
// viewbob when running
self.punchangle_x = 1*sin(time*15);
#endif
#endif // FTE
playrun1();
self.maxspeed *= 1.66;
} else if (!self.sprinting && !self.zoom) {
#ifdef PC
#ifdef FTE
if (self.viewzoom < 1)
self.viewzoom += 0.015;
else
self.viewzoom = 1;
if (checkMovement(-1))
self.punchangle_x = 0.25*sin(time*15);
#endif
self.punchangle_x = 0.25*sin(time*15);
#endif // FTE
} else if (self.zoom != 3) {
self.maxspeed *= 0.5;
}
@ -267,13 +278,15 @@ void() PlayerPreThink =
break;
}
#ifdef PC
#ifdef FTE
if (checkMovement(backward)) {
self.maxspeed *= 0.7;
} else if (checkMovement(left) || checkMovement(right)) {
self.maxspeed *= 0.8;
}
#endif
#endif // FTE
self.maxspeed *= GetWeaponWalkSpeed(self.perks, self.weapon);
}
@ -344,7 +357,8 @@ void() PlayerPostThink =
self.lastsound_time = time - 0.15;
}
#ifdef PC
#ifdef FTE
//footsteps
if((vlen(self.velocity) > 100) &&(( time - self.lastsound_time > 0.4) || (time - self.lastsound_time > 0.3 && self.sprinting)) && (self.flags & FL_ONGROUND))
{
@ -368,7 +382,8 @@ void() PlayerPostThink =
self.lastsound_time = time;
}
}
#endif
#endif // FTE
if (self.health_delay < time && self.health != self.max_health && !self.downed)
{
@ -399,15 +414,19 @@ void() PlayerPostThink =
if (self.sprinting) {
self.sprint_timer = self.sprint_duration + (time - self.sprint_start_time);
#ifndef PC
#ifndef FTE
if (!self.velocity || self.stance != 2) {
W_SprintStop();
}
#else
#else
if (!self.velocity || !checkMovement(0) || self.stance != 2) { //moto (FIXME) -- move me!
W_SprintStop();
}
#endif
#endif // FTE
if (self.perks & P_STAMIN) {
if (self.sprint_timer > sprint_max_time * 2) {
@ -429,26 +448,25 @@ void() PlayerPostThink =
// Perform a traceline to keep track of entities directly
// in front of the player.
//#ifndef QUAKESPASM
vector source;
makevectors (self.v_angle);
source = self.origin + self.view_ofs;
#ifdef PC
#ifdef FTE
self.dimension_hit = HITBOX_DIM_LIMBS | HITBOX_DIM_ZOMBIES;
#endif // PC
#endif // FTE
traceline (source, source + v_forward*800*1.2, 0, self);
#ifdef PC
#ifdef FTE
self.dimension_hit = HITBOX_DIM_ZOMBIES;
#endif // PC
#endif // FTE
// use .head here to avoid expanding ent struct
@ -463,7 +481,6 @@ void() PlayerPostThink =
else
self.facingenemy = false;
//#endif // QUAKESPASM
};
void() ClientKill = {};
@ -471,11 +488,13 @@ void() ClientKill = {};
//called when a client connects to the server
void() ClientConnect =
{
#ifdef PC
#ifdef FTE
// Maintain old FGD values and just convert them to new ones
//
if (world.fog) {
// Force fog on PC
// Force fog on FTE
if (!world.PC_fog) {
// Don't execute more than once
if (!world_fog) {
@ -498,7 +517,8 @@ void() ClientConnect =
localcmd(strcat("fog ", world_fog));
}
}
#endif
#endif // FTE
if(cvar("developer") || player_count > 1) {
bprint(PRINT_HIGH, self.netname); //print player name
@ -532,10 +552,15 @@ void() PlayerSpawn =
self.isspec = FALSE;
self.classname = "player";
self.solid = SOLID_BBOX;
// We can only collide with zombies (and not their limbs)
#ifdef PC
#ifdef FTE
self.dimension_hit = HITBOX_DIM_ZOMBIES;
#endif // PC
#endif // FTE
setmodel(self, "models/player.mdl");
self.movetype = MOVETYPE_WALK;
self.max_health = self.health = 100;
@ -653,7 +678,8 @@ void() PlayerSpawn =
PromptLevelChange(self.nextthink + 3, 1, self);
UpdatePlayerCount(player_count);
#ifdef PC
#ifdef FTE
PollPlayerPoints();
UpdateV2model("", 0);
stuffcmd(self, "cl_gunx 8;cl_guny 16;cl_gunz 25\n");
@ -663,11 +689,14 @@ void() PlayerSpawn =
if (G_WORLDTEXT)
WorldText(world.chaptertitle, world.location, world.date, world.person, self);
#else
#else
self.Weapon_Name = GetWeaponName(self.weapon);
self.Flash_Offset = GetWeaponFlash_Offset(self.weapon);
self.Flash_Size = GetWeaponFlash_Size(self.weapon);
#endif
#endif // FTE
if (G_STARTROUND != 1) {
rounds = G_STARTROUND - 1;
@ -703,11 +732,14 @@ void() PutClientInServer =
if (spawn_time > time || !rounds)
PlayerSpawn();
// TEMPORARY
#ifdef PC
#ifdef FTE
else
SpectatorSpawn();
#endif
#endif // FTE
};
//called when client disconnects from the server
@ -734,9 +766,11 @@ void() SetChangeParms =
{
};
#ifdef PC
#ifdef FTE
void() SV_RunClientCommand =
{
runstandardplayerphysics(self);
}
#endif
#endif // FTE

View file

@ -227,7 +227,8 @@ void() NewRound =
if (rounds == dogRound && gotdog) {
roundtype = 2;
#ifdef PC
#ifdef FTE
localcmd("fog 0.25\n");
@ -235,13 +236,14 @@ void() NewRound =
localcmd("fog 200 225 177 193 204\n");
#endif // PC
#endif // FTE
} else {
roundtype = 1;
if (world.fog) {
#ifndef PC
#ifndef FTE
localcmd(strcat("fog ", world.fog));
@ -249,7 +251,7 @@ void() NewRound =
localcmd(strcat("fog ", world_fog));
#endif // PC
#endif // FTE
}
}

View file

@ -69,9 +69,11 @@ float(string params) Command_give =
self.reload_delay2 = self.fire_delay2 = self.reload_delay = self.fire_delay = 0;
#ifndef PC
#ifndef FTE
self.Weapon_Name = GetWeaponName(self.weapon);
#endif
#endif // FTE
return COMMAND_SUCCESS;
}
@ -168,8 +170,10 @@ void(string command_string) SV_ParseClientCommand =
// Client override was disabled, so let the engine
// deal with whatever was sent.
#ifdef PC
#ifdef FTE
if (client_parse_override == false)
clientcommand(self, command_string);
#endif // PC
#endif // FTE
};

View file

@ -47,11 +47,14 @@ float(float value, float minValue, float maxValue) clamp = {
*
* Returns: The remainder of a divided by n
*/
#ifndef PC
#ifndef FTE
float(float a, float n) mod = {
return a - (n * floor(a / n));
};
#endif
#endif // FTE
/*
* sign

View file

@ -54,12 +54,14 @@ void () W2_Frame_Update =
if (self.anim_weapon2_time > time)
return; //don't call every frame, if it is the animations will play too fast
#ifndef PC
#ifndef FTE
if (self.weapon == W_KAR_SCOPE || self.weapon == W_HEADCRACKER) {
self.weapon2frame = self.weaponframe;
return;
}
#endif
#endif // FTE
self.anim_weapon2_time = time + self.weapon2_animduration;

View file

@ -59,7 +59,9 @@ void(float direct_impact) Ray_BeamExplode =
raybeam_damage_min, raybeam_damage_radius);
// Spawn Effects
#ifdef PC
#ifdef FTE
// Determine color of the beam
vector raybeam_color;
@ -69,19 +71,19 @@ void(float direct_impact) Ray_BeamExplode =
te_customflash(self.origin, raybeam_damage_radius, 300,
raybeam_color);
#else
WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
#ifdef HANDHELD
if (self.effects & EF_RAYGREEN)
WriteByte (MSG_BROADCAST, TE_RAYSPLASHGREEN);
else
WriteByte (MSG_BROADCAST, TE_RAYSPLASHRED);
#else
WriteByte (MSG_BROADCAST, TE_EXPLOSION);
#endif // HANDHELD
WriteCoord (MSG_BROADCAST, self.origin_x);
WriteCoord (MSG_BROADCAST, self.origin_y);
WriteCoord (MSG_BROADCAST, self.origin_z);
#endif // PC
#endif // FTE
// Cleanup
SUB_Remove ();
@ -159,7 +161,7 @@ void() W_FireRay =
// Prepare trail effects.
if (IsPapWeapon(porter.weapon)) {
#ifdef PC
#ifdef FTE
Light_Custom(porter, false, 75, 2, 0.25, 0.25);
@ -167,11 +169,11 @@ void() W_FireRay =
porter.effects = EF_RAYRED;
#endif // PC
#endif // FTE
} else {
#ifdef PC
#ifdef FTE
Light_Custom(porter, false, 75, 0.25, 2, 0.25);
@ -179,7 +181,8 @@ void() W_FireRay =
porter.effects = EF_RAYGREEN;
#endif // PC
#endif // FTE
}
// final setup!

View file

@ -60,23 +60,21 @@ void() W_AimIn =
return;
}
#ifndef PC
#ifndef FTE
self.ADS_Offset = GetWeaponADSOfs_PSP(self.weapon);
#endif // PC
#endif // FTE
if (self.weapon == W_KAR_SCOPE || self.weapon == W_PTRS ||
self.weapon == W_HEADCRACKER || self.weapon == W_PENETRATOR) {
SetUpdate(self, UT_ZOOM2, 0, 0, 0);
//#ifdef QUAKESPASM
#ifndef FTE
//self.zoom = 1;
self.zoom = 1;
//#else
self.zoom = 2;
//#endif // QUAKESPASM
#endif // FTE
self.scopetime = time + 0.3;
} else {
@ -100,9 +98,11 @@ void() W_AimOut =
ReturnWeaponModel();
}
#ifndef PC
#ifndef FTE
self.zoom = 0;
#endif
#endif // FTE
if (!self.downed)
playout();
@ -123,10 +123,12 @@ void() W_SprintStop =
if (self.isBuying || !self.sprinting)
return;
//TEMPORARY
#ifndef PC
#ifndef FTE
self.zoom = 0;
#endif
#endif // FTE
Set_W_Frame (startframe, endframe, 0, 0, SPRINT, SUB_Null, modelname, false, S_BOTH); // BUG IS HERE
@ -150,13 +152,9 @@ void W_SprintStart () {
else
self.sprint_duration -= self.sprint_rest_time;
#ifdef QUAKESPASM
if (!self.sprintflag) {
return;
}
#endif
if (self.fire_delay > time ||
self.fire_delay2 > time ||
@ -173,9 +171,11 @@ void W_SprintStart () {
float endframe = GetFrame(self.weapon,SPRINT_IN_END);
string modelname = GetWeaponModel(self.weapon, 0);
#ifndef PC
#ifndef FTE
self.zoom = 3;
#endif
#endif // FTE
if (startframe || endframe) {
Set_W_Frame (startframe, endframe, 0, 0, SPRINT, ContinueRun, modelname, false, S_BOTH);
@ -277,11 +277,14 @@ void() W_Switch =
self.reload_delay2 = self.fire_delay2 = self.reload_delay = self.fire_delay = 0;
#ifndef PC
#ifndef FTE
self.Weapon_Name = GetWeaponName(self.weapon);
self.Flash_Offset = GetWeaponFlash_Offset(self.weapon);
self.Flash_Size = GetWeaponFlash_Size(self.weapon);
#endif
#endif // FTE
}
}
@ -477,9 +480,12 @@ void(float side) W_Reload =
}
//TEMPORARY
#ifdef PC
#ifdef FTE
self.viewzoom = 1;
#endif
#endif // FTE
self.zoom = false;
W_AimOut();
@ -641,7 +647,8 @@ void(vector org, vector vel, float damage) SpawnBlood =
{
local entity f;
#ifdef PC
#ifdef FTE
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
WriteByte(MSG_MULTICAST, EVENT_BLOOD);
WriteCoord(MSG_MULTICAST, org_x);
@ -649,18 +656,25 @@ void(vector org, vector vel, float damage) SpawnBlood =
WriteCoord(MSG_MULTICAST, org_z);
msg_entity = self;
multicast('0 0 0', MULTICAST_ONE);
#else
#else
particle (org, vel*0.1, 73, damage*2);
#endif
#endif // FTE
f = find (world, classname, "player");
f.hitcount = f.hitcount + 1;
};
void(vector where) spawn_gibs = {
#ifndef PC
#ifndef FTE
particle(where, where*0.1, 225, 1);
#else
#else
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
WriteByte(MSG_MULTICAST, EVENT_BLOOD);
WriteCoord(MSG_MULTICAST, where_x);
@ -668,7 +682,9 @@ void(vector where) spawn_gibs = {
WriteCoord(MSG_MULTICAST, where_z);
msg_entity = self;
multicast('0 0 0', MULTICAST_ONE);
#endif
#endif // FTE
}
@ -733,11 +749,11 @@ void Parse_Damage () = // DO NOT TOUCH
body_ent.usedent = self;
body_ent.bleedingtime = time + 2;
#ifndef PC
#ifndef FTE
updateLimb (body_ent.head.owner, 0, world);
#endif // PC
#endif // FTE
}
}
@ -761,11 +777,11 @@ void Parse_Damage () = // DO NOT TOUCH
setmodel(body_ent.larm,"");
body_ent.larm.frame = 0;
#ifndef PC
#ifndef FTE
updateLimb (body_ent.larm.owner, 1, world);
#endif // PC
#endif // FTE
}
@ -787,11 +803,11 @@ void Parse_Damage () = // DO NOT TOUCH
setmodel(body_ent.rarm,"");
body_ent.rarm.frame = 0;
#ifndef PC
#ifndef FTE
updateLimb (body_ent.rarm.owner, 2, world);
#endif // PC
#endif // FTE
}
@ -958,22 +974,29 @@ void(float damage, vector dir, vector org, vector plane, entity hit_ent, float s
SetUpdate(self, UT_HM, 0, 0, 0);
#ifndef PC
#ifndef FTE
msg_entity = self;
WriteByte(MSG_ONE, SVC_HITMARK);
#endif
#endif // FTE
} else {
#ifndef PC
#ifndef FTE
WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
WriteByte (MSG_BROADCAST, TE_GUNSHOT);
WriteCoord (MSG_BROADCAST, org_x);
WriteCoord (MSG_BROADCAST, org_y);
WriteCoord (MSG_BROADCAST, org_z);
#endif
#endif // FTE
}
#ifdef PC
#ifdef FTE
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
WriteByte(MSG_MULTICAST, EVENT_PISTOLFIRE);
WriteEntity(MSG_MULTICAST, self);
@ -986,7 +1009,8 @@ void(float damage, vector dir, vector org, vector plane, entity hit_ent, float s
WriteCoord(MSG_MULTICAST, plane_z);
WriteEntity(MSG_MULTICAST, hit_ent);
multicast(trace_endpos, MULTICAST_PHS);
#endif
#endif // FTE
};
@ -1002,9 +1026,11 @@ void (float shotcount, float sprd, float Damage, float side) FireTrace =
src = self.origin + self.view_ofs;
#ifndef PC
#ifndef FTE
CL_SendWeaponFire();
#endif
#endif // FTE
while (count < shotcount)
{
@ -1181,22 +1207,22 @@ void() W_FireTesla =
makevectors (self.v_angle);
source = self.origin + self.view_ofs;
#ifdef PC
#ifdef FTE
self.dimension_hit = HITBOX_DIM_LIMBS | HITBOX_DIM_ZOMBIES;
#endif // PC
#endif // FTE
FireTrace(1, 0, 0, 0);
#ifdef PC
#ifdef FTE
self.dimension_hit = HITBOX_DIM_ZOMBIES;
#endif // PC
#endif // FTE
#ifdef PC
#ifdef FTE
te_lightning2(self, source, trace_endpos);
@ -1212,18 +1238,23 @@ void() W_FireTesla =
WriteCoord (MSG_BROADCAST, trace_endpos_y);
WriteCoord (MSG_BROADCAST, trace_endpos_z);
#endif // PC
#endif // FTE
LightningDamage (self.origin, trace_endpos + v_forward*4, self, 30);
}
void() Flame_LingerThink =
{
#ifdef PC
#ifdef FTE
te_flamejet(self.origin, v_up*8, 5);
#else
#else
particle (self.origin, v_up*8, 0, 0);
#endif
#endif // FTE
if (self.ltime < time)
remove(self);
@ -1479,13 +1510,21 @@ void(float side) W_Fire =
// Weapon Projectile/Trace Logic.
if (Util_WeaponFiresTraceshot(self.weapon)) {
#ifdef PC
#ifdef FTE
self.dimension_hit = HITBOX_DIM_LIMBS | HITBOX_DIM_ZOMBIES;
#endif
#endif // FTE
FireTrace(shotcount, spread, damage, side);
#ifdef PC
#ifdef FTE
self.dimension_hit = HITBOX_DIM_ZOMBIES;
#endif // PC
#endif // FTE
}
switch(firetype) {
@ -1544,10 +1583,13 @@ void(float side) W_Fire =
// REFORMAT THIS
#ifndef PC
#ifndef FTE
self.effects = self.effects | EF_MUZZLEFLASH;
#else
// psp takes care of this in engine
#else
// standard ports take care of this in engine
if (self.perks & P_DEAD)
return;
@ -1557,7 +1599,9 @@ void(float side) W_Fire =
self.punchangle_x = Wep_Recoil_x;
self.punchangle_y = Wep_Recoil_y;
self.punchangle_z = Wep_Recoil_z;
#endif
#endif // FTE
}
@ -1620,9 +1664,8 @@ void () W_Knife =
{ // hit wall
sound (self, CHAN_WEAPON, "sounds/weapons/knife/knife_hit.wav", 1, ATTN_NORM);
/* naievil (FIXME) add weapon decal here */
#ifdef FTE
#ifdef PC
if (self.weapon != W_RAY && self.weapon != W_PORTER) {
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
WriteByte(MSG_MULTICAST, EVENT_PISTOLFIRE);
@ -1637,13 +1680,17 @@ void () W_Knife =
WriteEntity(MSG_MULTICAST, hit_ent);
multicast(trace_endpos, MULTICAST_PHS);
}
#else
#else
WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
WriteByte (MSG_BROADCAST, TE_GUNSHOT);
WriteCoord (MSG_BROADCAST, org_x);
WriteCoord (MSG_BROADCAST, org_y);
WriteCoord (MSG_BROADCAST, org_z);
#endif
#endif // FTE
}
if (r > 40 && hit)//lunge
@ -1738,9 +1785,11 @@ void() GrenadeExplode =
else
DamgageExplode (self, self.owner, 1200, 1000, 128); //explosive weapons are more powerful :)
#ifdef PC
#ifdef FTE
te_customflash(self.origin, 178, 300, '1 1 1');
#endif
#endif // FTE
CallExplosion(self.origin);
@ -1805,11 +1854,16 @@ void() W_ThrowBetty =
oldself = self;
self = betty;
#ifdef PC
#ifdef FTE
droptofloor();
#else
#else
droptofloor(0, 0);
#endif
#endif // FTE
self = oldself;
}
betty.origin += v_forward * 0;
@ -2046,20 +2100,27 @@ void () Impulse_Functions =
switch (self.impulse)
{
case 10:
#ifdef PC
// FTE handles jumping on PC, which we don't want.. so we use impulses to override.
#ifdef FTE
// FTE handles jumping, which we don't want.. so we use impulses to override.
JumpCheck(1);
#endif
#endif // FTE
break;
case 22:
addmoney(self, 10000, 0);
rounds += 4;
break;
case 23:
#ifdef PC
#ifdef FTE
if (!checkMovement(forward))
return;
#endif
#endif // FTE
if (self.dive || self.downed)
return;
switch(self.stance) {
@ -2073,23 +2134,18 @@ void () Impulse_Functions =
break;
default: break;
}
self.sprintflag = true;
W_SprintStart();
break;
case 24:
self.sprintflag = false;
W_SprintStop();
break;
case 25:
#ifdef HANDHELD
switch_nade();
#else
break;
case 33:
W_Betty();
#endif // HANDHELD
break;
case 26:
case 30:
@ -2098,16 +2154,12 @@ void () Impulse_Functions =
else
Change_Stance();
break;
#ifdef QUAKESPASM
case 31:
self.sprintflag = 0;
break;
case 32:
self.sprintflag = 1;
break;
#endif // QUAKESPASM
case 110:
case 111:
W_PutOut();
@ -2133,9 +2185,13 @@ void () Impulse_Functions =
waypoint_mode = 1;
break;
default:
#ifdef PC
#ifdef FTE
bprint(PRINT_HIGH, "Unknown impulse: ", ftos(self.impulse));
#endif
#endif // FTE
break;
}
@ -2216,14 +2272,10 @@ void() CheckPlayer =
CheckPowerups(self);
CheckRevive(self);
#ifdef QUAKESPASM
if (!self.sprintflag && self.sprinting) {
W_SprintStop();
}
#endif
// FIXME - can't do frame independent stance changing.. ofs starts spazzing..
if (self.view_ofs_z > self.new_ofs_z) {
self.changestance = true;
@ -2241,7 +2293,8 @@ void() CheckPlayer =
}
/* Check player push start */
#ifdef PC
#ifdef FTE
entity ent;
ent = findradius(self.origin, 70);
@ -2325,7 +2378,9 @@ void() CheckPlayer =
}
ent = ent.chain;
}
#endif
#endif // FTE
/* Check for player push end */
if (!self.button2 && self.flags & FL_ONGROUND) {
@ -2333,9 +2388,12 @@ void() CheckPlayer =
if (self.perks & P_FLOP && fabs(self.oldz - self.origin_z) > 90) {
sound (self, CHAN_WEAPON, "sounds/weapons/grenade/explode.wav", 1, ATTN_NORM);
DamgageExplode (self, self, 225, 75, 128);
#ifdef PC
#ifdef FTE
te_customflash(self.origin, 128, 300, '1 1 1');
#endif
#endif // FTE
CallExplosion(self.origin);
}
@ -2358,9 +2416,9 @@ void () Weapon_Logic =
W_Frame_Update ();
Impulse_Functions();
#ifndef PC
#ifndef FTE
// For HANDHELD/QUAKESPASM only to tell our engine to display the scope
// For non-FTE only to tell our engine to display the scope
if ((self.scopetime < time) && self.scopetime) {
self.scopetime = 0;
self.zoom = 2;
@ -2372,38 +2430,56 @@ void () Weapon_Logic =
UpdatePunchangle(self);
#endif // PC
#endif // FTE
//
// Fire Button Logic
// NOTE: Since the right weapon is the "normal" side there's some
// flip flop logic on PC so that LMB will fire the left side instead.
// flip flop logic on FTE so that LMB will fire the left side instead.
//
// Right Trigger/LMB/etc.
if (self.button0) {
#ifdef PC
#ifdef FTE
if (IsDualWeapon(self.weapon)) { W_Fire(S_LEFT); } else { W_Fire(S_RIGHT); }
#else
W_Fire(S_RIGHT);
#endif // PC
#endif // FTE
} else {
// Check for release for semi automatic weapons.
#ifdef PC
#ifdef FTE
if (IsDualWeapon(self.weapon)) { self.semi2 = false; } else { self.semi = false; }
#else
self.semi = false;
#endif // PC
#endif // FTE
}
// Left Trigger/RMB/etc.
if (self.button8) {
if (IsDualWeapon(self.weapon)) {
#ifdef PC
#ifdef FTE
W_Fire(S_RIGHT);
#else
W_Fire(S_LEFT);
#endif // PC
#endif // FTE
} else {
// Toggle ADS back and forth
if (cvar("cl_adsmode")) {
@ -2413,24 +2489,32 @@ void () Weapon_Logic =
W_AimOut();
self.zoom = 0;
#ifdef PC
#ifdef FTE
self.viewzoom = 1;
UpdateVmodel(self.weaponmodel, GetWepSkin(self.weapon));
UpdateV2model(self.weapon2model, 0);
#endif // PC
#endif // FTE
} else {
W_AimIn();
self.zoom = 1;
#ifdef PC
#ifdef FTE
self.viewzoom = 0.9;
#endif // PC
#endif // FTE
}
} else {
if (!self.zoom) {
W_AimIn();
}
#ifdef PC
#ifdef FTE
else {
float zoom_factor = 1 - (0.018*GetWeaponZoomAmount(self.weapon));
if (self.viewzoom > zoom_factor)
@ -2438,13 +2522,17 @@ void () Weapon_Logic =
else
self.viewzoom = zoom_factor;
}
#endif // PC
#endif // FTE
}
}
}
// AIM button is released
else if (!self.button8 && self.zoom) {
#ifdef PC
#ifdef FTE
if (self.weapon == W_KAR_SCOPE || self.weapon == W_PTRS ||
self.weapon == W_HEADCRACKER || self.weapon == W_PENETRATOR) {
if (self.viewzoom == 0.2) {
@ -2468,17 +2556,27 @@ void () Weapon_Logic =
self.viewzoom = 1;
self.zoom = 0;
}
#else
W_AimOut();
#endif // PC
#endif // FTE
} else {
// Check for release for semi automatic weapons.
if (IsDualWeapon(self.weapon)) {
#ifdef PC
#ifdef FTE
self.semi = false;
#else
self.semi2 = false;
#endif // PC
#endif // FTE
}
}
@ -2516,14 +2614,11 @@ void () Weapon_Logic =
if (self.button6 && !self.semiknife)
{
#ifdef HANDHELD
if (self.sprinting) {
dolphin_dive();
return;
}
#endif // HANDHELD
W_Knife();
self.semiknife = true;
}

View file

@ -54,12 +54,10 @@ const float EVENT_REVIVEON = 37;
const float EVENT_REVIVEOFF = 38;
const float EVENT_REVIVECHANGE = 39;
// Define our PC version
#ifndef QUAKESPASM
#ifndef HANDHELD
#define PC
#endif
#endif
// Define our FTE platform
#ifndef STANDARD
#define FTE
#endif // STANDARD
// Weapon Firetype definitions
#define FIRETYPE_FULLAUTO 0

View file

@ -29,7 +29,8 @@
#define CHAN_MUSIC 1
#define CHAN_SFX 2
#ifdef PC
#ifdef FTE
void(string soundname, optional float channel, optional float volume) localsound_enhanced =
{
if (!volume)
@ -47,4 +48,5 @@ void(string soundname, optional float channel, optional float volume) localsound
localsound(soundname, channel, volume);
}
#endif // PC
#endif // FTE

View file

@ -1529,11 +1529,7 @@ float(float wep, float frametype, optional float z) GetFrame =
switch (frametype)
{
case FIRE_START:
#ifndef PC
return 1;
#else
return 0;
#endif
case FIRE_END:
return 2;
case RELOAD_START:
@ -4006,21 +4002,25 @@ vector(float wep) GetWeaponRecoil =
temp1 = change_1 + change_2;
temp2 = change_1 + change_2 + change_3;
#ifdef PC
#ifdef FTE
if (r < change_1)
final_kick_y = kick_change_x*0.25;
else if (r < temp1)
final_kick_x = kick_change_y*-1*.25;
else if (r < temp2)
final_kick_y = kick_change_z*-1*0.25;
#else
if (r < change_1)
final_kick_y = kick_change_x;
else if (r < temp1)
final_kick_x = kick_change_y*-1;
else if (r < temp2)
final_kick_y = kick_change_z*-1;
#endif // PC
#endif // FTE
final_kick_y = final_kick_y + guaranteed_x;
final_kick_x = final_kick_x - guaranteed_y;
@ -4038,139 +4038,70 @@ vector(float wep) GetWeaponRecoil =
vector (float wep) GetWeaponFlash_Offset =
{
switch(wep) {
#ifndef QUAKESPASM
case W_COLT:
return [5488, -2742, 35300];
case W_BIATCH:
return [8588, -3842, 35300];
case W_KAR:
case W_KAR_SCOPE:
case W_HEADCRACKER:
case W_ARMAGEDDON:
return [5560, -4582, 75833];
case W_THOMPSON:
case W_GIBS:
return [6203, -5740, 57670];
case W_TRENCH:
case W_GUT:
return [5550, -4118, 62364];
case W_357:
case W_KILLU:
return [8193, -2353, 50527];
case W_MG:
case W_BARRACUDA:
return [6806, -9375, 81713];
case W_DB:
case W_BORE:
return [5801, -4300, 83174];
case W_SAWNOFF:
return [5801, -4414, 44820];
case W_M1A1:
case W_WIDDER:
return [5317, -5331, 70583];
case W_BAR:
case W_WIDOW:
return [3899, -5021, 78199];
case W_FG:
case W_IMPELLER:
return [14000, -12000, 110000];
case W_GEWEHR:
case W_COMPRESSOR:
return [6500, -8500, 65000];
case W_PPSH:
case W_REAPER:
return [11100, -9000, 86300];
case W_MP40:
case W_AFTERBURNER:
return [11300, -11300, 85000];
case W_MP5K:
case W_KOLLIDER:
return [19300, -15300, 85000];
case W_STG:
case W_SPATZ:
return [10300, -10230, 100000];
case W_M1:
case W_M1000:
return [3506, -1500, 33000];
case W_BROWNING:
case W_ACCELERATOR:
return [15726, -23375, 170713];
case W_PTRS:
case W_PENETRATOR:
return [10988, -14242, 180300];
case W_TYPE:
case W_SAMURAI:
return [488, -2300, 25300];
default:
return [5488, -2742, 35300];
#endif
#ifdef QUAKESPASM
case W_COLT:
case W_BIATCH:
return [1950, -6250, 35300];
case W_KAR:
case W_KAR_SCOPE:
case W_HEADCRACKER:
case W_ARMAGEDDON:
return [-5120, -13582, 75833];
case W_THOMPSON:
case W_GIBS:
return [770, -12740, 57670];
case W_TRENCH:
case W_GUT:
return [-7450, -17918, 62364];
case W_357:
case W_KILLU:
return [4093, -7353, 50527];
case W_MG:
case W_BARRACUDA:
return [-4006, -19375, 81713];
case W_DB:
case W_BORE:
return [-6700, -18300, 83174];
case W_SAWNOFF:
return [-8501, -19414, 44820];
case W_M1A1:
case W_WIDDER:
return [-4717, -15331, 70583];
case W_BAR:
case W_WIDOW:
return [-7599, -17321, 78199];
case W_FG:
case W_IMPELLER:
return [1800, -25500, 110000];
case W_GEWEHR:
case W_COMPRESSOR:
return [-2200, -17800, 65000];
case W_PPSH:
case W_REAPER:
return [300, -18500, 86300];
case W_MP40:
case W_AFTERBURNER:
return [1570, -21300, 80000];
case W_MP5K:
case W_KOLLIDER:
return [1570, -21300, 80000];
case W_STG:
case W_SPATZ:
return [2500, -30230, 100000];
case W_M1:
case W_M1000:
return [-750, -7842, 28300];
case W_BROWNING:
case W_ACCELERATOR:
return [-1926, -51375, 170713];
case W_PTRS:
case W_PENETRATOR:
return [-7888, -37242, 180300];
case W_TYPE:
case W_SAMURAI:
return [-4488, -7800, 25300];
default:
return [5488, -2742, 35300];
#endif
case W_COLT:
return [5488, -2742, 35300];
case W_BIATCH:
return [8588, -3842, 35300];
case W_KAR:
case W_KAR_SCOPE:
case W_HEADCRACKER:
case W_ARMAGEDDON:
return [5560, -4582, 75833];
case W_THOMPSON:
case W_GIBS:
return [6203, -5740, 57670];
case W_TRENCH:
case W_GUT:
return [5550, -4118, 62364];
case W_357:
case W_KILLU:
return [8193, -2353, 50527];
case W_MG:
case W_BARRACUDA:
return [6806, -9375, 81713];
case W_DB:
case W_BORE:
return [5801, -4300, 83174];
case W_SAWNOFF:
return [5801, -4414, 44820];
case W_M1A1:
case W_WIDDER:
return [5317, -5331, 70583];
case W_BAR:
case W_WIDOW:
return [3899, -5021, 78199];
case W_FG:
case W_IMPELLER:
return [14000, -12000, 110000];
case W_GEWEHR:
case W_COMPRESSOR:
return [6500, -8500, 65000];
case W_PPSH:
case W_REAPER:
return [11100, -9000, 86300];
case W_MP40:
case W_AFTERBURNER:
return [11300, -11300, 85000];
case W_MP5K:
case W_KOLLIDER:
return [19300, -15300, 85000];
case W_STG:
case W_SPATZ:
return [10300, -10230, 100000];
case W_M1:
case W_M1000:
return [3506, -1500, 33000];
case W_BROWNING:
case W_ACCELERATOR:
return [15726, -23375, 170713];
case W_PTRS:
case W_PENETRATOR:
return [10988, -14242, 180300];
case W_TYPE:
case W_SAMURAI:
return [488, -2300, 25300];
default:
return [5488, -2742, 35300];
}
return [0, 0, 0];
}

View file

@ -2,7 +2,7 @@
cd ../
# create build directories
mkdir -p build/{pc,handheld,quakespasm,vita}
mkdir -p build/{fte,standard}
cd bin/
echo ""
echo "========================"
@ -18,13 +18,7 @@ echo ""
./fteqcc-cli-lin -srcfile ../progs/fte-server.src
echo ""
echo "========================"
echo " compiling PSP & 3DS QC "
echo " compiling STANDARD QC "
echo "========================"
echo ""
./fteqcc-cli-lin -srcfile ../progs/handheld.src
echo ""
echo "========================"
echo "compiling QUAKESPASM QC "
echo "========================"
echo ""
./fteqcc-cli-lin -srcfile ../progs/quakespasm.src
./fteqcc-cli-lin -srcfile ../progs/standard.src

View file

@ -1,10 +1,8 @@
@ECHO OFF
CD ../
REM ****** create build directories ******
MKDIR build\pc\ 2>nul
MKDIR build\handheld\ 2>nul
MKDIR build\quakespasm\ 2>nul
MKDIR build\vita\ 2>nul
MKDIR build\fte\ 2>nul
MKDIR build\standard\ 2>nul
CD bin/
echo.
echo ========================
@ -20,14 +18,8 @@ echo.
fteqcc-cli-win.exe -srcfile ../progs/fte-server.src
echo.
echo ========================
echo compiling PSP & 3DS QC
echo compiling STANDARD QC
echo ========================
echo.
fteqcc-cli-win.exe -srcfile ../progs/handheld.src
echo.
echo ========================
echo compiling QUAKESPASM QC
echo ========================
echo.
fteqcc-cli-win.exe -srcfile ../progs/quakespasm.src
fteqcc-cli-win.exe -srcfile ../progs/standard.src
pause