mirror of
https://github.com/id-Software/quake-rerelease-qc.git
synced 2024-11-09 23:11:44 +00:00
Update 4 id1, hipnotic, mg1, and rogue source
This commit is contained in:
parent
bebf782915
commit
7bcbd29c99
14 changed files with 149 additions and 12 deletions
|
@ -726,6 +726,7 @@ void() PutClientInServer =
|
|||
self.healthrot_nextcheck = 0;
|
||||
self.fired_weapon = 0; // [NDS] haleyjd
|
||||
self.took_damage = 0; // [NDS] haleyjd
|
||||
self.team = TEAM_NONE;
|
||||
|
||||
if ( coop ) {
|
||||
self.team = TEAM_HUMANS;
|
||||
|
|
|
@ -362,9 +362,13 @@ float SVC_INTERMISSION = 30;
|
|||
float SVC_FINALE = 31;
|
||||
float SVC_CDTRACK = 32;
|
||||
float SVC_SELLSCREEN = 33;
|
||||
float SVC_SPAWNEDMONSTER = 39;
|
||||
float SVC_SPAWNEDMONSTER = 39;
|
||||
float SVC_ACHIEVEMENT = 52;
|
||||
|
||||
float SVC_CHAT = 53;
|
||||
float SVC_LEVELCOMPLETED = 54;
|
||||
float SVC_BACKTOLOBBY = 55;
|
||||
float SVC_LOCALSOUND = 56;
|
||||
float SVC_PROMPT = 57;
|
||||
|
||||
float TE_SPIKE = 0;
|
||||
float TE_SUPERSPIKE = 1;
|
||||
|
@ -378,6 +382,8 @@ float TE_KNIGHTSPIKE = 8;
|
|||
float TE_LIGHTNING3 = 9;
|
||||
float TE_LAVASPLASH = 10;
|
||||
float TE_TELEPORT = 11;
|
||||
float TE_EXPLOSION2 = 12;
|
||||
float TE_BEAM = 13;
|
||||
|
||||
// sound channels
|
||||
// channel 0 never willingly overrides
|
||||
|
@ -416,7 +422,8 @@ float MSG_ONE = 1; // reliable to one (msg_entity)
|
|||
float MSG_ALL = 2; // reliable to all
|
||||
float MSG_INIT = 3; // write to the init string
|
||||
|
||||
// team numbers for Coop
|
||||
// team numbers
|
||||
float TEAM_NONE = -1;
|
||||
float TEAM_MONSTERS = 0;
|
||||
float TEAM_HUMANS = 1;
|
||||
|
||||
|
|
|
@ -96,7 +96,9 @@ void(float offset) hknight_shot =
|
|||
setmodel (newmis, "progs/k_spike.mdl");
|
||||
setsize (newmis, VEC_ORIGIN, VEC_ORIGIN);
|
||||
newmis.velocity = vec*300;
|
||||
newmis.effects = newmis.effects | EF_CANDLELIGHT; // give the projectiles a weak glow
|
||||
if (cvar("pr_checkextension"))
|
||||
if (checkextension("EX_EXTENDED_EF"))
|
||||
newmis.effects = newmis.effects | EF_CANDLELIGHT; // give the projectiles a weak glow
|
||||
sound (self, CHAN_WEAPON, "hknight/attack1.wav", 1, ATTN_NORM);
|
||||
};
|
||||
|
||||
|
|
|
@ -137,7 +137,9 @@ void() OgreFireGrenade =
|
|||
|
||||
missile.touch = OgreGrenadeTouch;
|
||||
|
||||
missile.effects = missile.effects | EF_CANDLELIGHT; // give the grenades a weak glow
|
||||
if (cvar("pr_checkextension"))
|
||||
if (checkextension("EX_EXTENDED_EF"))
|
||||
missile.effects = missile.effects | EF_CANDLELIGHT; // give the projectiles a weak glow
|
||||
|
||||
// set missile duration
|
||||
missile.nextthink = time + 2.5;
|
||||
|
|
|
@ -520,7 +520,10 @@ void(string gibname, float dm) ThrowGib =
|
|||
setmodel (new, gibname);
|
||||
setsize (new, '0 0 0', '0 0 0');
|
||||
new.velocity = VelocityForDamage (dm);
|
||||
new.movetype = MOVETYPE_GIB;
|
||||
new.movetype = MOVETYPE_BOUNCE;
|
||||
if (cvar("pr_checkextension"))
|
||||
if (checkextension("EX_MOVETYPE_GIB"))
|
||||
new.movetype = MOVETYPE_GIB;
|
||||
new.solid = SOLID_NOT;
|
||||
new.avelocity_x = random()*600;
|
||||
new.avelocity_y = random()*600;
|
||||
|
@ -537,7 +540,10 @@ void(string gibname, float dm) ThrowHead =
|
|||
setmodel (self, gibname);
|
||||
self.frame = 0;
|
||||
self.nextthink = -1;
|
||||
self.movetype = MOVETYPE_GIB;
|
||||
self.movetype = MOVETYPE_BOUNCE;
|
||||
if (cvar("pr_checkextension"))
|
||||
if (checkextension("EX_MOVETYPE_GIB"))
|
||||
self.movetype = MOVETYPE_GIB;
|
||||
self.takedamage = DAMAGE_NO;
|
||||
self.solid = SOLID_NOT;
|
||||
self.view_ofs = '0 0 8';
|
||||
|
|
|
@ -34,7 +34,7 @@ void() SetMovedir =
|
|||
self.movedir = '0 0 -1';
|
||||
else
|
||||
{
|
||||
makevectorsfixed(self.angles);
|
||||
makevectors(self.angles);
|
||||
self.movedir = v_forward;
|
||||
}
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ void() multi_touch =
|
|||
// if the trigger has an angles field, check player's facing direction
|
||||
if (self.movedir != '0 0 0')
|
||||
{
|
||||
makevectorsfixed(other.angles);
|
||||
makevectors(other.angles);
|
||||
if (v_forward * self.movedir < 0)
|
||||
return; // not facing the right way
|
||||
}
|
||||
|
|
|
@ -1285,7 +1285,7 @@ void() ServerflagsCommand =
|
|||
|
||||
void() QuadCheat =
|
||||
{
|
||||
if (deathmatch || coop)
|
||||
if (!cheats_allowed)
|
||||
return;
|
||||
|
||||
self.super_time = 1;
|
||||
|
|
|
@ -96,7 +96,9 @@ void(float offset) hknight_shot =
|
|||
setmodel (newmis, "progs/k_spike.mdl");
|
||||
setsize (newmis, VEC_ORIGIN, VEC_ORIGIN);
|
||||
newmis.velocity = vec*300;
|
||||
newmis.effects = newmis.effects | EF_CANDLELIGHT; // give the projectiles a weak glow
|
||||
if (cvar("pr_checkextension"))
|
||||
if (checkextension("EX_EXTENDED_EF"))
|
||||
newmis.effects = newmis.effects | EF_CANDLELIGHT; // give the projectiles a weak glow
|
||||
sound (self, CHAN_WEAPON, "hknight/attack1.wav", 1, ATTN_NORM);
|
||||
};
|
||||
|
||||
|
|
|
@ -137,6 +137,10 @@ void() OgreFireGrenade =
|
|||
|
||||
missile.touch = OgreGrenadeTouch;
|
||||
|
||||
if (cvar("pr_checkextension"))
|
||||
if (checkextension("EX_EXTENDED_EF"))
|
||||
missile.effects = missile.effects | EF_CANDLELIGHT; // give the projectiles a weak glow
|
||||
|
||||
// set missile duration
|
||||
missile.nextthink = time + 2.5;
|
||||
missile.think = OgreGrenadeExplode;
|
||||
|
|
106
quakec_mg1/misc_model.qc
Normal file
106
quakec_mg1/misc_model.qc
Normal file
|
@ -0,0 +1,106 @@
|
|||
|
||||
const float MISC_MODEL_ANIMATED = 1;
|
||||
const float MISC_MODEL_ANIMATED_ONCE = 2;
|
||||
const float MISC_MODEL_ANIMATED_START_OFF = 4;
|
||||
|
||||
///////////////////////////////
|
||||
// Behaviour for a looping animation
|
||||
///////////////////////////////
|
||||
|
||||
void misc_model_think_loop()
|
||||
{
|
||||
self.frame += 1;
|
||||
if(self.frame == self.cnt)
|
||||
{
|
||||
self.frame = self.count; // Back to start
|
||||
}
|
||||
self.nextthink = time + 0.1;
|
||||
}
|
||||
|
||||
void misc_model_use_loop()
|
||||
{
|
||||
if(self.spawnflags & MISC_MODEL_ANIMATED_START_OFF)
|
||||
{
|
||||
self.spawnflags (-) MISC_MODEL_ANIMATED_START_OFF;
|
||||
self.think = misc_model_think_loop;
|
||||
misc_model_think_loop();
|
||||
}
|
||||
else
|
||||
{
|
||||
self.spawnflags (+) MISC_MODEL_ANIMATED_START_OFF;
|
||||
self.think = SUB_Null;
|
||||
self.nextthink = -1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
///////////////////////////////
|
||||
// Behaviour for a single animation
|
||||
///////////////////////////////
|
||||
|
||||
void misc_model_think_once()
|
||||
{
|
||||
self.frame += 1;
|
||||
if(self.frame < self.cnt)
|
||||
{
|
||||
self.nextthink = time + 0.1;
|
||||
}
|
||||
}
|
||||
|
||||
void misc_model_use_once()
|
||||
{
|
||||
self.frame = self.count;
|
||||
self.think = misc_model_think_once;
|
||||
self.nextthink = time + 0.1;
|
||||
}
|
||||
|
||||
///////////////////////////////
|
||||
|
||||
void misc_model()
|
||||
{
|
||||
if(self.model == "") { objerror("misc_model with no model specified"); }
|
||||
precache_model(self.model);
|
||||
setmodel(self, self.model);
|
||||
setorigin(self, self.origin);
|
||||
self.solid = SOLID_NOT;
|
||||
|
||||
if(self.spawnflags == 0)
|
||||
{
|
||||
makestatic(self);
|
||||
return;
|
||||
}
|
||||
|
||||
if(self.cnt < self.frame) { objerror("misc_model with invalid frame range (cnt < frame)"); }
|
||||
if(self.targetname == "") { objerror("misc_model with no targetname"); }
|
||||
self.count = self.frame;
|
||||
|
||||
if(self.spawnflags & MISC_MODEL_ANIMATED_ONCE)
|
||||
{
|
||||
self.use = misc_model_use_once;
|
||||
}
|
||||
else if(self.spawnflags & (MISC_MODEL_ANIMATED | MISC_MODEL_ANIMATED_START_OFF))
|
||||
{
|
||||
self.use = misc_model_use_loop;
|
||||
// Stupid way to do it but just flip the bit flag and pretend we just used it.
|
||||
self.spawnflags ^= MISC_MODEL_ANIMATED_START_OFF;
|
||||
misc_model_use_loop();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -68,6 +68,7 @@ monsters/oldone.qc // registered
|
|||
|
||||
misc_corpses.qc //Corpses yay
|
||||
misc_fx.qc // adds screenshake
|
||||
misc_model.qc //generic static and animated model
|
||||
|
||||
//Map specific code? Why not..
|
||||
map_specific/mge2m2.qc
|
||||
|
|
|
@ -97,7 +97,9 @@ void(float offset) hknight_shot =
|
|||
setmodel (newmis, "progs/k_spike.mdl");
|
||||
setsize (newmis, VEC_ORIGIN, VEC_ORIGIN);
|
||||
newmis.velocity = vec*300;
|
||||
newmis.effects = newmis.effects | EF_CANDLELIGHT; // give the projectiles a weak glow
|
||||
if (cvar("pr_checkextension"))
|
||||
if (checkextension("EX_EXTENDED_EF"))
|
||||
newmis.effects = newmis.effects | EF_CANDLELIGHT; // give the projectiles a weak glow
|
||||
sound (self, CHAN_WEAPON, "hknight/attack1.wav", 1, ATTN_NORM);
|
||||
};
|
||||
|
||||
|
|
|
@ -134,6 +134,10 @@ void() OgreFireGrenade =
|
|||
missile.avelocity = '300 300 300';
|
||||
missile.angles = vectoangles(missile.velocity);
|
||||
|
||||
if (cvar("pr_checkextension"))
|
||||
if (checkextension("EX_EXTENDED_EF"))
|
||||
missile.effects = missile.effects | EF_CANDLELIGHT; // give the projectiles a weak glow
|
||||
|
||||
// set missile duration
|
||||
if(self.spawnflags & OGRE_BOSS)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue