compiles, doesn't link

This commit is contained in:
Bill Currie 2003-10-27 22:27:29 +00:00
parent 13ecbceba2
commit 60082be06f
36 changed files with 131 additions and 42 deletions

View file

@ -1,6 +1,10 @@
#include "common.qh" #include "common.qh"
#include "misc.qh"
#include "act.qh" #include "act.qh"
#include "server.qh" #include "server.qh"
#include "menu.qh"
#include "mdl.qh"
#include "weapon.qh"
void() PlayerPreThink = { void() PlayerPreThink = {
if (is_cl(self)) if (is_cl(self))

View file

@ -12,6 +12,6 @@
void() act_setup; void() act_setup;
} };
#endif #endif

View file

@ -1,6 +1,11 @@
#include "common.qh" #include "common.qh"
#include "client.qh" #include "client.qh"
#include "server.qh"
#include "equip.qh"
#include "misc.qh"
#include "weapon.qh" #include "weapon.qh"
#include "damage.qh" #include "damage.qh"

View file

@ -3,6 +3,7 @@
#include "damage.qh" #include "damage.qh"
#include "mdl.qh" #include "mdl.qh"
#include "client.qh" #include "client.qh"
#include "server.qh"
#include "misc.qh" #include "misc.qh"
#include "items.qh" #include "items.qh"
@ -593,8 +594,8 @@ float() player_takeitem = {
local float eid; local float eid;
nitem = 0; nitem = 0;
str1 = NULL_string; str1 = NIL;
str2 = NULL_string; str2 = NIL;
while ((eid = equip_iter(other)) != -1) { while ((eid = equip_iter(other)) != -1) {
if (equip_query(self, eid)) if (equip_query(self, eid))
@ -619,7 +620,7 @@ float() player_takeitem = {
self.armortype = other.armortype; self.armortype = other.armortype;
_item_xprint_strs(nitem, str1, str2); _item_xprint_strs(nitem, str1, str2);
str2 = NULL_string; str2 = NIL;
if (self.armortype >= 0.8) if (self.armortype >= 0.8)
str1 = "strong armor"; str1 = "strong armor";
else if (self.armortype >= 0.6) else if (self.armortype >= 0.6)

View file

@ -4,6 +4,8 @@
#include "effect.qh" #include "effect.qh"
#include "mdl.qh" #include "mdl.qh"
#include "misc.qh"
#include "bodyque.qh" #include "bodyque.qh"
float _bodyque_current; float _bodyque_current;

View file

@ -3,6 +3,8 @@
#include "misc.qh" #include "misc.qh"
#include "override.qh" #include "override.qh"
#include "mapents.qh"
#include "mdl.qh" #include "mdl.qh"
#include "mdl_player.qh" #include "mdl_player.qh"
#include "mdl_void.qh" #include "mdl_void.qh"
@ -225,6 +227,6 @@ void() ClientDisconnect = {
bprint(PRINT_HIGH, name(self), " disconnected with ", ftos(self.frags), " frags\n"); bprint(PRINT_HIGH, name(self), " disconnected with ", ftos(self.frags), " frags\n");
override_set_th_kill(self, NOTHING_function); override_set_th_kill(self, NOTHING_function);
self.deathmsg1 = NULL_string; self.deathmsg1 = NIL;
damage(self, self, self, DAMAGE_MUSTDIE, NOTHING_function); damage(self, self, self, DAMAGE_MUSTDIE, NOTHING_function);
}; };

View file

@ -3,6 +3,8 @@
#include "misc.qh" #include "misc.qh"
#include "damage.qh" #include "damage.qh"
#include "server.qh"
void() damage_init = { void() damage_init = {
ghost_inflictor = spawn("GHOST_INFLICTOR"); ghost_inflictor = spawn("GHOST_INFLICTOR");
}; };
@ -41,8 +43,8 @@ void() _deathmsg_custom = {
}; };
void() deathmsg_nodisplay = { void() deathmsg_nodisplay = {
refcount_dec(self.dmg_attacker); //XXX refcount_dec(self.dmg_attacker);
refcount_dec(self.dmg_inflictor); //XXX refcount_dec(self.dmg_inflictor);
self.dmg_attacker = world; self.dmg_attacker = world;
self.dmg_inflictor = world; self.dmg_inflictor = world;
@ -127,8 +129,8 @@ damage = {
ent.dmg_attacker = attacker; ent.dmg_attacker = attacker;
ent.dmg_inflictor = inflictor; ent.dmg_inflictor = inflictor;
refcount_inc(ent.dmg_attacker); //XXX refcount_inc(ent.dmg_attacker);
refcount_inc(ent.dmg_inflictor); //XXX refcount_inc(ent.dmg_inflictor);
if (inflictor.deathmsg1) if (inflictor.deathmsg1)
ent.deathmsg = _deathmsg_custom; ent.deathmsg = _deathmsg_custom;

View file

@ -30,6 +30,8 @@
.void() th_die; .void() th_die;
.void() th_kill; .void() th_kill;
.float(entity missile) th_projectile;
/* ghost_inflictor is for radius and bullets... /* ghost_inflictor is for radius and bullets...
Only guaranteed to have: Only guaranteed to have:
classname classname
@ -51,6 +53,8 @@ float(entity ent, entity attacker, entity inflictor, float d, void() deathmessag
/* Fill in appropriate fields, inflictor _WILL_ be modified. */ /* Fill in appropriate fields, inflictor _WILL_ be modified. */
void(entity ignore, entity attacker, entity inflictor, void() deathmessage) damage_radius; void(entity ignore, entity attacker, entity inflictor, void() deathmessage) damage_radius;
float(vector org, entity e) _damage_radius_can_hit;
}; };
#endif #endif

View file

@ -1,4 +1,5 @@
#include "common.qh" #include "common.qh"
#include "misc.qh"
#include "server.qh" #include "server.qh"
#include "delays.qh" #include "delays.qh"

View file

@ -1,5 +1,7 @@
#include "common.qh" #include "common.qh"
#include "misc.qh"
#include "mapents.qh"
#include "mapents_util.qh" #include "mapents_util.qh"
#include "items.qh" #include "items.qh"
#include "mapents_triggers.qh" #include "mapents_triggers.qh"
@ -256,7 +258,7 @@ Wait decrease count by 1 until it reaches 0, then activate targets.
void() trigger_counter = { void() trigger_counter = {
util_map_entity_init(); util_map_entity_init();
self.model = NULL_string; self.model = NIL;
self.modelindex = 0; self.modelindex = 0;
if (!self.count) if (!self.count)

View file

@ -1,10 +1,10 @@
#ifndef ITEMS_qh #ifndef ITEMS_qh
#define ITEMS_qh 1 #define ITEMS_qh 1
void() item_generic_touch; @extern void() item_generic_touch;
void() item_generic; @extern void() item_generic;
void() item_remove_regen; @extern void() item_remove_regen;
.float() th_takeitem; @extern .float() th_takeitem;
#endif #endif

View file

@ -1,4 +1,6 @@
#include "common.qh" #include "common.qh"
#include "misc.qh"
#include "effect.qh"
#include "mapents_util.qh" #include "mapents_util.qh"
#include "damage.qh" #include "damage.qh"

View file

@ -4,6 +4,10 @@
entity intermission_head; entity intermission_head;
entity spawn_head; entity spawn_head;
void() info_notnull;
void() light;
void() misc_explobox;
void() func_wall;
#ifndef IMPLEMENT_MAPENTS #ifndef IMPLEMENT_MAPENTS
}; };

View file

@ -1,4 +1,7 @@
#include "common.qh" #include "common.qh"
#include "server.qh"
#include "weapon.qh"
#include "misc.qh"
#include "mapents_util.qh" #include "mapents_util.qh"
#include "damage.qh" #include "damage.qh"
@ -234,8 +237,8 @@ float(float d) _movewall_door_takedamage = {
/* Use target if you need it to go more /* Use target if you need it to go more
than once */ than once */
self.message = ""; self.message = "";
self.noise1 = NULL_string; self.noise1 = NIL;
self.noise2 = NULL_string; self.noise2 = NIL;
} }
self = self.enemy; self = self.enemy;
@ -272,8 +275,8 @@ void() _movewall_door_touch = {
/* Use target if you need it to go more /* Use target if you need it to go more
than once */ than once */
self.message = ""; self.message = "";
self.noise1 = NULL_string; self.noise1 = NIL;
self.noise2 = NULL_string; self.noise2 = NIL;
} }
self = self.enemy; self = self.enemy;
} }
@ -323,12 +326,12 @@ void() _door_link = {
tail.message = ""; tail.message = "";
tail.noise1 = NULL_string; tail.noise1 = NIL;
tail.noise2 = NULL_string; tail.noise2 = NIL;
tail.noise3 = NULL_string; tail.noise3 = NIL;
tail.noise4 = NULL_string; tail.noise4 = NIL;
tail.noise5 = NULL_string; tail.noise5 = NIL;
tail.noise6 = NULL_string; tail.noise6 = NIL;
} }
tail.enemy = world; tail.enemy = world;
@ -673,8 +676,8 @@ void() _movewall_secret_use = {
void() _movewall_secret_think = { void() _movewall_secret_think = {
if (floor(self.state) != self.state) { if (floor(self.state) != self.state) {
if (self.count == 0 && self.state == 0.5) { if (self.count == 0 && self.state == 0.5) {
self.message = NULL_string; self.message = NIL;
self.noise2 = NULL_string; self.noise2 = NIL;
if (!util_use_targets()) { if (!util_use_targets()) {
self.velocity = '0 0 0'; self.velocity = '0 0 0';

View file

@ -1,6 +1,11 @@
#include "common.qh" #include "common.qh"
#include "mapents_util.qh" #include "mapents_util.qh"
#include "items.qh" #include "items.qh"
#include "weapon.qh"
#include "act.qh"
#include "misc.qh"
#include "mdl_player.qh"
#include "mdl_eyes.qh"
#include "override.qh" #include "override.qh"
#include "damage.qh" #include "damage.qh"
@ -77,7 +82,7 @@ void() _powerup_think = {
if (powerup.noise) { if (powerup.noise) {
sound(self, CHAN_AUTO, powerup.noise, 1, ATTN_NORM); sound(self, CHAN_AUTO, powerup.noise, 1, ATTN_NORM);
powerup.noise = NULL_string; powerup.noise = NIL;
} }
powerup.air_finished += 1; powerup.air_finished += 1;
@ -405,7 +410,7 @@ void() _ring_think = {
if (powerup.noise) { if (powerup.noise) {
sound(self, CHAN_AUTO, powerup.noise, 1, ATTN_NORM); sound(self, CHAN_AUTO, powerup.noise, 1, ATTN_NORM);
powerup.noise = NULL_string; powerup.noise = NIL;
} }
powerup.air_finished += 1; powerup.air_finished += 1;

View file

@ -89,13 +89,13 @@ void() trap_spikeshooter = {
} else if (self.spawnflags & SPAWNFLAG_SUPERSPIKE) { } else if (self.spawnflags & SPAWNFLAG_SUPERSPIKE) {
self.weaponmodel = "progs/s_spike.mdl"; self.weaponmodel = "progs/s_spike.mdl";
self.noise1 = "weapons/spike2.wav"; self.noise1 = "weapons/spike2.wav";
self.noise2 = NULL_string; self.noise2 = NIL;
self.speed = 1000; self.speed = 1000;
self.dmg = 18; self.dmg = 18;
} else { } else {
self.weaponmodel = "progs/spike.mdl"; self.weaponmodel = "progs/spike.mdl";
self.noise1 = "weapons/spike2.wav"; self.noise1 = "weapons/spike2.wav";
self.noise2 = NULL_string; self.noise2 = NIL;
self.speed = 1000; self.speed = 1000;
self.dmg = 9; self.dmg = 9;
} }

View file

@ -1,9 +1,14 @@
#include "common.qh" #include "common.qh"
#include "effect.qh"
#include "weapon.qh"
#include "misc.qh"
#include "mapents_util.qh" #include "mapents_util.qh"
#include "damage.qh" #include "damage.qh"
#include "mapents_triggers.qh" #include "mapents_triggers.qh"
#include "mapents.qh"
#include "teleport.qh"
float(float d) _takedamage_use = { float(float d) _takedamage_use = {
if (time < self.attack_finished) if (time < self.attack_finished)
@ -148,7 +153,7 @@ void() trigger_teleport = {
self.noise = "ambience/hum1.wav"; self.noise = "ambience/hum1.wav";
setmodel(self, self.model); setmodel(self, self.model);
self.model = NULL_string; self.model = NIL;
self.modelindex = 0; self.modelindex = 0;
util_map_entity_init(); util_map_entity_init();

View file

@ -1,5 +1,6 @@
#include "common.qh" #include "common.qh"
#include "misc.qh" #include "misc.qh"
#include "server.qh"
#include "mapents_util.qh" #include "mapents_util.qh"
@ -118,9 +119,9 @@ float() util_use_targets = {
if (self.count > 0) { if (self.count > 0) {
self.count--; self.count--;
if (!self.count) { if (!self.count) {
self.targetname = NULL_string; self.targetname = NIL;
self.target = NULL_string; self.target = NIL;
self.killtarget = NULL_string; self.killtarget = NIL;
self.use = NOTHING_function; self.use = NOTHING_function;
self.touch = NOTHING_function; self.touch = NOTHING_function;

View file

@ -4,6 +4,8 @@
#define SPAWNFLAGS_CHECK_ITEMS 16384 #define SPAWNFLAGS_CHECK_ITEMS 16384
#define SPAWNFLAGS_TAKE_ITEMS 32768 #define SPAWNFLAGS_TAKE_ITEMS 32768
@extern {
.void() th_activate; .void() th_activate;
void() util_map_entity_init; void() util_map_entity_init;
@ -21,4 +23,6 @@ float(entity e) is_teleportable;
float(entity ent1, entity ent2) util_entities_touch; float(entity ent1, entity ent2) util_entities_touch;
};
#endif #endif

View file

@ -1,4 +1,5 @@
#include "math.qh" #include "math.qh"
#include "builtins.qh"
/* Ugh. QuakeC doesn't include these ops. */ /* Ugh. QuakeC doesn't include these ops. */
float(float num, float bits) shl = { float(float num, float bits) shl = {

View file

@ -1,6 +1,7 @@
#ifndef MDL_qh #ifndef MDL_qh
#define MDL_qh 1 #define MDL_qh 1
@extern {
.void(float func, float extra) mdl_func; .void(float func, float extra) mdl_func;
.float mdl_mod; .float mdl_mod;
@ -8,6 +9,8 @@
.float mdl_thought; .float mdl_thought;
.float mdl_var; .float mdl_var;
};
#define MDL_FUNC_IDLE 0 #define MDL_FUNC_IDLE 0
#define MDL_FUNC_JUMP 1 #define MDL_FUNC_JUMP 1
#define MDL_FUNC_PAIN 2 #define MDL_FUNC_PAIN 2
@ -29,8 +32,9 @@
#define MDL_MOD_SWIM_IN 512 #define MDL_MOD_SWIM_IN 512
#define MDL_MOD_SWIM (MDL_MOD_SWIM_IN|MDL_MOD_SWIM_OVER) #define MDL_MOD_SWIM (MDL_MOD_SWIM_IN|MDL_MOD_SWIM_OVER)
@extern {
void(float func, float extra) mdl_func_void; void(float func, float extra) mdl_func_void;
entity(float func, float extra) mdl_bodyque_and_func; entity(float func, float extra) mdl_bodyque_and_func;
};
#endif #endif

View file

@ -1,4 +1,7 @@
#include "common.qh" #include "common.qh"
#include "effect.qh"
#include "misc.qh"
#include "mdl.qh" #include "mdl.qh"
#include "mdl_player.qh" #include "mdl_player.qh"

View file

@ -1,7 +1,11 @@
#ifndef MDL_PLAYER_qh #ifndef MDL_PLAYER_qh
#define MDL_PLAYER_qh 1 #define MDL_PLAYER_qh 1
@extern {
void() mdl_player_init; void() mdl_player_init;
void() mdl_setup_player; void() mdl_setup_player;
};
#endif #endif

View file

@ -3,11 +3,11 @@
#include "menus.qh" #include "menus.qh"
.float menu_state; @extern .float menu_state;
.float menu_time; @extern .float menu_time;
.void() menu_think; @extern .void() menu_think;
void(void() menu_func) menu_set; @extern void(void() menu_func) menu_set;
float() util_menu_needs_print; @extern float() util_menu_needs_print;
#endif #endif

View file

@ -1,5 +1,7 @@
#include "client.qh"
#include "common.qh" #include "common.qh"
#include "menu.qh" #include "menu.qh"
#include "misc.qh"
/* /*
void() menu_team = { void() menu_team = {

View file

@ -1,6 +1,6 @@
#ifndef MENUS_qh #ifndef MENUS_qh
#define MENUS_qh 1 #define MENUS_qh 1
void() menu_intro; @extern void() menu_intro;
#endif #endif

View file

@ -1,7 +1,9 @@
#include "common.qh" #include "common.qh"
#include "protocol.qh" #include "protocol.qh"
#include "misc.qh" #include "misc.qh"
#include "server.qh"
#include "teleport.qh" #include "teleport.qh"
#include "weapon.qh"
// ===================================================================== // // ===================================================================== //
@ -21,7 +23,7 @@ void() SUB_remove = { remove(self); };
void(entity e) safe_remove = { void(entity e) safe_remove = {
e.takedamage = DAMAGE_NO; e.takedamage = DAMAGE_NO;
e.solid = SOLID_NOT; e.solid = SOLID_NOT;
e.model = NULL_string; e.model = NIL;
e.modelindex = 0; e.modelindex = 0;
e.think = SUB_remove; e.think = SUB_remove;

View file

@ -1,7 +1,10 @@
#include "act.qh"
#include "common.qh" #include "common.qh"
#include "items.qh" #include "items.qh"
#include "damage.qh" #include "damage.qh"
#include "misc.qh"
#include "teleport.qh" #include "teleport.qh"
#include "override.qh" #include "override.qh"

View file

@ -1,6 +1,8 @@
#ifndef SZ_WATCH_qh #ifndef SZ_WATCH_qh
#define SZ_WATCH_qh 1 #define SZ_WATCH_qh 1
@extern {
float sv_spawning; float sv_spawning;
void() SZ_init; void() SZ_init;
@ -9,4 +11,6 @@ void() SZ_frame;
void(entity e) makestatic; void(entity e) makestatic;
void(vector pos, string samp, float vol, float atten) ambientsound; void(vector pos, string samp, float vol, float atten) ambientsound;
};
#endif #endif

View file

@ -2,6 +2,7 @@
#include "mapents_util.qh" #include "mapents_util.qh"
#include "damage.qh" #include "damage.qh"
#include "effect.qh" #include "effect.qh"
#include "misc.qh"
#include "teleport.qh" #include "teleport.qh"
void() _deathmsg_teleport = { void() _deathmsg_teleport = {

View file

@ -1,4 +1,5 @@
#include "common.qh" #include "common.qh"
#include "misc.qh"
#include "weapon.qh" #include "weapon.qh"
#include "damage.qh" #include "damage.qh"

View file

@ -1,4 +1,5 @@
#include "common.qh" #include "common.qh"
#include "effect.qh"
#include "weapon.qh" #include "weapon.qh"
#include "equip.qh" #include "equip.qh"

View file

@ -1,4 +1,5 @@
#include "common.qh" #include "common.qh"
#include "misc.qh"
#include "weapon.qh" #include "weapon.qh"
#include "equip.qh" #include "equip.qh"

View file

@ -1,5 +1,7 @@
#include "common.qh" #include "common.qh"
#include "misc.qh"
#include "weapon.qh" #include "weapon.qh"
.float weapon_imp; .float weapon_imp;

View file

@ -4,8 +4,14 @@
#include "weapon_g.qh" #include "weapon_g.qh"
#include "mdl.qh" #include "mdl.qh"
@extern {
.void() w_think;
.float(float action) w_func; .float(float action) w_func;
.float attack_finished; .float attack_finished;
.float weapon_imp;
.float weapons;
.float w_thought;
#define WEAPON_INIT 0 #define WEAPON_INIT 0
#define WEAPON_AMMO 1 #define WEAPON_AMMO 1
@ -33,5 +39,8 @@ float(float impluse) util_impulse_to_IT;
float(.float ammo_field, float ammo) util_weapon_use_ammo; float(.float ammo_field, float ammo) util_weapon_use_ammo;
float(.float ammo_field, float max_ammo, float ammo) util_weapon_give_ammo; float(.float ammo_field, float max_ammo, float ammo) util_weapon_give_ammo;
void(float imp, float idx, float(float action) func) _weapon_select;
};
#endif #endif

View file

@ -1,6 +1,8 @@
#ifndef WEAPON_G_qh #ifndef WEAPON_G_qh
#define WEAPON_G_qh 1 #define WEAPON_G_qh 1
@extern {
void() weapon_init_weapons; void() weapon_init_weapons;
void() weapon_select_best; void() weapon_select_best;
@ -8,4 +10,6 @@ void(float imp) weapon_select_by_impulse;
void() update_weapon_flags; void() update_weapon_flags;
};
#endif #endif