Skip to content

Commit a75e99d

Browse files
committed
Weapons Of Destruction, version 6.05.
Source-code release only. Bug fixes.
1 parent e4e6822 commit a75e99d

23 files changed

+456
-241
lines changed

Makefile

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
CFLAGS = -O -Dstricmp=Q_stricmp -D__cdecl=
2+
LDFLAGS = -S
3+
4+
ORIGDIR=Source
5+
6+
OBJS = dwm.o g_ai.o g_chase.o g_cmds.o g_combat.o g_func.o g_items.o \
7+
g_main.o g_misc.o g_monster.o g_phys.o g_team.o g_save.o g_spawn.o \
8+
g_svcmds.o g_target.o g_trigger.o g_turret.o g_utils.o g_weapon.o \
9+
jetpack.o kamikaze.o lasertrip.o lsight.o m_actor.o m_berserk.o \
10+
m_boss2.o m_boss3.o m_boss31.o m_boss32.o m_brain.o m_chick.o \
11+
m_flash.o m_flipper.o m_float.o m_flyer.o m_gladiator.o m_gunner.o \
12+
m_hover.o m_infantry.o m_insane.o m_medic.o m_move.o m_mutant.o \
13+
m_parasite.o m_soldier.o m_supertank.o m_tank.o maplist.o \
14+
p_client.o p_hook.o p_hud.o p_menu.o p_trail.o p_view.o p_weapon.o \
15+
q_shared.o s_cam.o scanner.o wf_decoy.o x_fbomb.o x_fire.o
16+
17+
gamei386.so: $(OBJS)
18+
ld -o $@ $(OBJS) -shared $(LDFLAGS); chmod 0755 $@
19+
20+
clean:
21+
/bin/rm -f $(OBJS) gamei386.so
22+
23+
$*.o: $*.c
24+
$(CC) $(CFLAGS) -c $*.c
25+
26+
$*.c: $(ORIGDIR)/$*.c
27+
tr -d '\015' < $(ORIGDIR)/$*.c > $*.c
28+
29+
$*.h: $(ORIGDIR)/$*.h
30+
tr -d '\015' < $(ORIGDIR)/$*.h > $*.h
31+
32+
# DO NOT DELETE
33+
34+
dwm.o: g_local.h q_shared.h game.h
35+
g_ai.o: g_local.h q_shared.h game.h
36+
g_cmds.o: g_local.h q_shared.h game.h m_player.h
37+
g_combat.o: g_local.h q_shared.h game.h
38+
g_func.o: g_local.h q_shared.h game.h
39+
g_items.o: g_local.h q_shared.h game.h
40+
g_main.o: g_local.h q_shared.h game.h
41+
g_misc.o: g_local.h q_shared.h game.h
42+
g_monster.o: g_local.h q_shared.h game.h
43+
g_phys.o: g_local.h q_shared.h game.h
44+
g_save.o: g_local.h q_shared.h game.h
45+
g_spawn.o: g_local.h q_shared.h game.h
46+
g_svcmds.o: g_local.h q_shared.h game.h
47+
g_target.o: g_local.h q_shared.h game.h
48+
g_trigger.o: g_local.h q_shared.h game.h
49+
g_turret.o: g_local.h q_shared.h game.h
50+
g_utils.o: g_local.h q_shared.h game.h
51+
g_weapon.o: g_local.h q_shared.h game.h
52+
jetpack.o: g_local.h q_shared.h game.h
53+
kamikaze.o: g_local.h q_shared.h game.h
54+
laser.o: g_local.h q_shared.h game.h
55+
lsight.o: g_local.h q_shared.h game.h
56+
m_actor.o: g_local.h q_shared.h game.h m_actor.h
57+
m_berserk.o: g_local.h q_shared.h game.h m_berserk.h
58+
m_boss2.o: g_local.h q_shared.h
59+
m_boss2.o: game.h m_boss2.h
60+
m_boss3.o: g_local.h q_shared.h
61+
m_boss3.o: game.h m_boss32.h
62+
m_boss31.o: g_local.h q_shared.h
63+
m_boss31.o: game.h m_boss31.h
64+
m_boss32.o: g_local.h q_shared.h
65+
m_boss32.o: game.h m_boss32.h
66+
m_brain.o: g_local.h q_shared.h
67+
m_brain.o: game.h m_brain.h
68+
m_chick.o: g_local.h q_shared.h
69+
m_chick.o: game.h m_chick.h
70+
m_flash.o: q_shared.h
71+
m_flipper.o: g_local.h q_shared.h
72+
m_flipper.o: game.h
73+
m_flipper.o: m_flipper.h
74+
m_float.o: g_local.h q_shared.h
75+
m_float.o: game.h m_float.h
76+
m_flyer.o: g_local.h q_shared.h
77+
m_flyer.o: game.h m_flyer.h
78+
m_gladiator.o: g_local.h q_shared.h
79+
m_gladiator.o: game.h m_gladiator.h
80+
m_gunner.o: g_local.h q_shared.h
81+
m_gunner.o: game.h m_gunner.h
82+
m_hover.o: g_local.h q_shared.h
83+
m_hover.o: game.h m_hover.h
84+
m_infantry.o: g_local.h q_shared.h
85+
m_infantry.o: game.h
86+
m_infantry.o: m_infantry.h
87+
m_insane.o: g_local.h q_shared.h
88+
m_insane.o: game.h m_insane.h
89+
m_medic.o: g_local.h q_shared.h
90+
m_medic.o: game.h m_medic.h
91+
m_move.o: g_local.h q_shared.h
92+
m_move.o: game.h
93+
m_mutant.o: g_local.h q_shared.h
94+
m_mutant.o: game.h m_mutant.h
95+
m_parasite.o: g_local.h q_shared.h
96+
m_parasite.o: game.h
97+
m_parasite.o: m_parasite.h
98+
m_soldier.o: g_local.h q_shared.h
99+
m_soldier.o: game.h
100+
m_soldier.o: m_soldier.h
101+
m_supertank.o: g_local.h q_shared.h
102+
m_supertank.o: game.h m_supertank.h
103+
m_tank.o: g_local.h q_shared.h
104+
m_tank.o: game.h m_tank.h
105+
maplist.o: g_local.h q_shared.h
106+
maplist.o: game.h
107+
p_client.o: g_local.h q_shared.h
108+
p_client.o: game.h m_player.h
109+
p_hook.o: g_local.h q_shared.h
110+
p_hook.o: game.h
111+
p_hud.o: g_local.h q_shared.h
112+
p_hud.o: game.h
113+
p_trail.o: g_local.h q_shared.h
114+
p_trail.o: game.h
115+
p_view.o: g_local.h q_shared.h
116+
p_view.o: game.h m_player.h
117+
p_weapon.o: g_local.h q_shared.h
118+
p_weapon.o: game.h m_player.h x_fbomb.h x_fire.h
119+
q_shared.o: q_shared.h
120+
s_cam.o: g_local.h q_shared.h
121+
s_cam.o: game.h
122+
scanner.o: g_local.h q_shared.h
123+
scanner.o: game.h
124+
wf_decoy.o: g_local.h q_shared.h
125+
wf_decoy.o: game.h m_player.h
126+
x_fbomb.o: g_local.h q_shared.h
127+
x_fbomb.o: game.h x_fbomb.h x_fire.h
128+
x_fire.o: g_local.h q_shared.h
129+
x_fire.o: game.h x_fire.h

g_items.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2141,7 +2141,7 @@ gitem_t gI_weapon_sniper =
21412141
IT_WEAPON|IT_ALTWEAPON|IT_STAY_COOP,
21422142
NULL,
21432143
0,
2144-
/* precache */ "weapons/rg_hum.wav"
2144+
/* precache */ "weapons/rg_hum.wav models/monsters/parasite/tip/tris.md2"
21452145
};
21462146

21472147
/*QUAKED weapon_plasma (.3 .3 1) (-16 -16 -16) (16 16 16)

g_local.h

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,8 @@ extern cvar_t *flood_persecond;
626626
extern cvar_t *flood_waitdelay;
627627

628628
extern cvar_t *gamedir;
629+
extern cvar_t *maplistfile;
630+
extern cvar_t *motdfile;
629631

630632
extern cvar_t *teamplay;
631633

@@ -1004,6 +1006,7 @@ void DropHook (edict_t *ent);
10041006
//
10051007
// g_weapon.c
10061008
//
1009+
void check_dodge (edict_t *self, vec3_t start, vec3_t dir, int speed);
10071010
void PlayerNoise(edict_t *who, vec3_t where, int type);
10081011
void P_ProjectSource (gclient_t *client, vec3_t point, vec3_t distance, vec3_t forward, vec3_t right, vec3_t result);
10091012
void Weapon_Generic (edict_t *ent, int FRAME_ACTIVATE_LAST, int FRAME_FIRE_LAST, int FRAME_IDLE_LAST, int FRAME_DEACTIVATE_LAST, int *pause_frames, int *fire_frames, void (*fire)(edict_t *ent));
@@ -1240,6 +1243,8 @@ struct gclient_s
12401243
edict_t *chase_target;
12411244
qboolean update_chase;
12421245
//ZOID
1246+
1247+
float tripwire_debounce_time;
12431248
};
12441249

12451250

@@ -1398,9 +1403,9 @@ struct edict_s
13981403
// ************************
13991404

14001405
//ThirdPerson Perspective Stuff
1401-
int thirdperson; // To tell the server if that person is in 3rd person mode
1402-
edict_t *clone; // This is what the player sees
1403-
int currentweapon; // This is for the weapon model info when in 3rd person mode
1406+
int thirdperson; // To tell the server if that person is in 3rd person mode
1407+
edict_t *clone; // This is what the player sees
1408+
int currentweapon; // This is for the weapon model info when in 3rd person mode
14041409
float thirdoffx; // So the player can move the camera around
14051410
float thirdoffz;
14061411

@@ -1412,9 +1417,10 @@ struct edict_s
14121417
int chasedist2;
14131418

14141419
edict_t *hook_target;
1415-
float burnout;
1416-
edict_t *burner;
1417-
edict_t *lasersight;
1420+
float burnout;
1421+
edict_t *burner;
1422+
1423+
edict_t *lasersight;
14181424
};
14191425

14201426
void LaserSightThink (edict_t *self);

g_phys.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ qboolean SV_RunThink (edict_t *ent)
8787
ent->nextthink = 0;
8888
if (!ent->think)
8989
{
90-
if (ent->classname)
90+
if (ent->classname && ent->model)
91+
gi.error ("NULL ent->think (classname %s, model %s)", ent->classname,
92+
ent->model);
93+
else if (ent->classname)
9194
gi.error ("NULL ent->think (classname %s)", ent->classname);
9295
else
9396
gi.error ("NULL ent->think");

g_save.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ void InitGame (void)
142142
//FIXME: sv_ prefix is wrong for these
143143
sv_rollspeed = gi.cvar ("sv_rollspeed", "200", 0);
144144
sv_rollangle = gi.cvar ("sv_rollangle", "2", 0);
145-
sv_maxvelocity = gi.cvar ("sv_maxvelocity", "2000", 0);
145+
sv_maxvelocity = gi.cvar ("sv_maxvelocity", "2500", 0);
146146
sv_gravity = gi.cvar ("sv_gravity", "800", 0);
147147

148148
// noset vars
@@ -162,6 +162,9 @@ void InitGame (void)
162162
maxentities = gi.cvar ("maxentities", "1024", CVAR_LATCH);
163163
maplist = gi.cvar ("maplist", "0", CVAR_SERVERINFO);
164164

165+
maplistfile = gi.cvar ("maplistfile", "maplist.txt", 0);
166+
motdfile = gi.cvar ("motdfile", "motd.txt", 0);
167+
165168
// change anytime vars
166169
dmflags = gi.cvar ("dmflags", "0", CVAR_SERVERINFO);
167170
fraglimit = gi.cvar ("fraglimit", "0", CVAR_SERVERINFO);

g_spawn.c

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,5 +1062,41 @@ void SP_worldspawn (edict_t *ent)
10621062
gi.imageindex (PIC_QUADDOT_TAG);
10631063
gi.imageindex (PIC_UP_TAG);
10641064
gi.imageindex (PIC_DOWN_TAG);
1065+
1066+
#if 0
1067+
// Precache Foxman's song list.
1068+
{
1069+
FILE *in;
1070+
char buffer[MAX_QPATH + 1], *res;
1071+
1072+
// Open the songlist file.
1073+
gi.dprintf ("Preparing to read songlist...\n");
1074+
sprintf (buffer, "./%s/songlist.txt", gamedir->string);
1075+
in = fopen (buffer, "rt");
1076+
if (in == NULL)
1077+
{
1078+
gi.dprintf ("No songlist -- can't open ./%s/songlist.txt\n",
1079+
gamedir->string);
1080+
}
1081+
else
1082+
{
1083+
gi.dprintf ("Reading songlist...\n");
1084+
1085+
// Precache each song in the list.
1086+
while ((res = fgets (buffer, sizeof (buffer), in)) != NULL)
1087+
{
1088+
// Chop the newline(s) from the end of the string.
1089+
res = buffer + strlen (buffer) - 1;
1090+
while (res >= buffer && (*res == 10 || *res == 13))
1091+
{ *res = 0; res--; }
1092+
1093+
// Precache this sound.
1094+
gi.soundindex (res);
1095+
}
1096+
1097+
fclose (in);
1098+
}
1099+
}
1100+
#endif
10651101
}
10661102

g_svcmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ void SVCmd_PlaySound_f (void)
437437
}
438438

439439
// Play the sound they want.
440-
gi.sound (world, CHAN_ITEM+CHAN_RELIABLE+CHAN_NO_PHS_ADD,
440+
gi.sound (world, CHAN_SONG+CHAN_RELIABLE+CHAN_NO_PHS_ADD,
441441
gi.soundindex (gi.argv (2)), 1, ATTN_NONE, 0);
442442
}
443443

g_team.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,11 +1539,13 @@ void TeamplaySpawnpointTouch (edict_t *self, edict_t *other,
15391539
// Display the changed spawnpoint.
15401540
gi.linkentity (self);
15411541

1542+
#ifdef EXT_DEVT
15421543
// HACK to use when I'm editing maps for Extinction.
15431544
if (sv_cheats->value)
15441545
gi.cprintf (other, PRINT_HIGH, "dmspot at [%i,%i,%i]\n",
15451546
(int)self->s.origin[0], (int)self->s.origin[1],
15461547
(int)self->s.origin[2]);
1548+
#endif EXT_DEVT
15471549
}
15481550

15491551

g_team.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,6 @@ qboolean TeamplayCheckRound2 (void);
8484
void TeamplayStartRound2 (void);
8585

8686
void TeamplayRebalanceTeams (void);
87+
88+
/* Define this to get some development code for Extinction.
89+
#define EXT_DEVT */

g_utils.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,10 @@ void G_InitEdict (edict_t *e)
388388

389389
// Clear what the free-edict list may have set.
390390
e->chain = NULL;
391+
392+
// This is another headache.
393+
e->think = NULL;
394+
e->nextthink = 0;
391395
}
392396

393397
// The free-edict list. Meant to vastly speed up G_Spawn().

0 commit comments

Comments
 (0)