Misc fixes. Including: Reset velocity on spawn, fix for respawning where died(?), reset effects on death, door unlock sound fix, nextthink fixes, bubble spawning fix.
This commit is contained in:
parent
0d3727f264
commit
05fab9bb6e
27
client.qc
27
client.qc
|
@ -79,7 +79,7 @@ void() SetNewParms =
|
|||
|
||||
void() DecodeLevelParms =
|
||||
{
|
||||
if (serverflags)
|
||||
if (!deathmatch) // [slipyx] new episode fix
|
||||
{
|
||||
if (world.model == "maps/start.bsp")
|
||||
SetNewParms (); // take away all stuff on starting new episode
|
||||
|
@ -350,7 +350,7 @@ When the player touches this, he gets sent to the map listed in the "map" variab
|
|||
void() trigger_changelevel =
|
||||
{
|
||||
if (!self.map)
|
||||
objerror ("chagnelevel trigger doesn't have map");
|
||||
objerror ("changelevel trigger doesn't have map");
|
||||
|
||||
InitTrigger ();
|
||||
self.touch = changelevel_touch;
|
||||
|
@ -412,6 +412,9 @@ Player entered the suicide command
|
|||
*/
|
||||
void() ClientKill =
|
||||
{
|
||||
// [slipyx] no kill during intermission
|
||||
if (intermission_running) return;
|
||||
|
||||
bprint (self.netname);
|
||||
bprint (" suicides\n");
|
||||
set_suicide_frame ();
|
||||
|
@ -510,6 +513,8 @@ void() PutClientInServer =
|
|||
|
||||
spot = SelectSpawnPoint ();
|
||||
|
||||
self.origin = self.oldorigin = spot.origin + '0 0 1'; // [slipyx] respawn where died fix?
|
||||
|
||||
self.classname = "player";
|
||||
self.health = 100;
|
||||
self.takedamage = DAMAGE_AIM;
|
||||
|
@ -556,6 +561,9 @@ void() PutClientInServer =
|
|||
|
||||
self.view_ofs = '0 0 22';
|
||||
|
||||
// [slipyx] reset velocity on spawn
|
||||
self.velocity = '0 0 0';
|
||||
|
||||
player_stand1 ();
|
||||
|
||||
if (deathmatch || coop)
|
||||
|
@ -693,22 +701,17 @@ Exit deathmatch games upon conditions
|
|||
*/
|
||||
void() CheckRules =
|
||||
{
|
||||
//local float timelimit;
|
||||
//local float fraglimit;
|
||||
|
||||
if (gameover) // someone else quit the game already
|
||||
return;
|
||||
|
||||
//timelimit = cvar("timelimit") * 60;
|
||||
//fraglimit = cvar("fraglimit");
|
||||
|
||||
if (timelimit && time >= timelimit)
|
||||
|
||||
// [slipyx] only check time and frag limit in deathmatch
|
||||
if (deathmatch && timelimit && time >= timelimit)
|
||||
{
|
||||
NextLevel ();
|
||||
return;
|
||||
}
|
||||
|
||||
if (fraglimit && self.frags >= fraglimit)
|
||||
|
||||
if (deathmatch && fraglimit && self.frags >= fraglimit)
|
||||
{
|
||||
NextLevel ();
|
||||
return;
|
||||
|
|
10
combat.qc
10
combat.qc
|
@ -95,17 +95,17 @@ void(entity targ, entity attacker) Killed =
|
|||
|
||||
// bonus shambler brag message :)
|
||||
if (self.classname == "monster_shambler") {
|
||||
bprint(pl.netname); bprint(" killed a shambler!\n");
|
||||
bprint (pl.netname); bprint (" killed a shambler!\n");
|
||||
}
|
||||
|
||||
// was a revenge kill, gain monster's kills
|
||||
if (self.frags > 0) {
|
||||
pl.frags += self.frags;
|
||||
bprint(pl.netname); bprint(" got revenge");
|
||||
bprint (pl.netname);
|
||||
if (pl.netname != self.netname) {
|
||||
bprint(" for "); bprint(self.netname);
|
||||
}
|
||||
bprint("!\n");
|
||||
bprint (" avenged "); bprint (self.netname);
|
||||
} else bprint (" got revenge");
|
||||
bprint ("!\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
2
doors.qc
2
doors.qc
|
@ -120,7 +120,7 @@ void() door_fire =
|
|||
// play use key sound
|
||||
|
||||
if (self.items) {
|
||||
sound (self, CHAN_VOICE, self.noise4, 1, ATTN_NORM);
|
||||
sound (self, CHAN_ITEM, self.noise4, 1, ATTN_NORM);
|
||||
// [slipyx] broadcast in coop
|
||||
if (coop)
|
||||
{
|
||||
|
|
2
items.qc
2
items.qc
|
@ -351,7 +351,7 @@ void() bound_other_ammo =
|
|||
|
||||
float(float w) RankForWeapon =
|
||||
{
|
||||
if (w == IT_LIGHTNING)
|
||||
if (self.waterlevel <= 1 && w == IT_LIGHTNING) // [slipyx] waterlevel fix
|
||||
return 1;
|
||||
if (w == IT_ROCKET_LAUNCHER)
|
||||
return 2;
|
||||
|
|
2
misc.qc
2
misc.qc
|
@ -173,7 +173,7 @@ void() misc_fireball =
|
|||
|
||||
precache_model ("progs/lavaball.mdl");
|
||||
self.classname = "fireball";
|
||||
self.nextthink = time + (random() * 5);
|
||||
self.nextthink = time + 0.1 + (random() * 5);
|
||||
self.think = fire_fly;
|
||||
if (!self.speed)
|
||||
self.speed = 1000;
|
||||
|
|
21
monsters.qc
21
monsters.qc
|
@ -68,9 +68,6 @@ void() monster_death_use =
|
|||
|
||||
void() walkmonster_start_go =
|
||||
{
|
||||
//local string stemp;
|
||||
//local entity etemp;
|
||||
|
||||
self.origin_z = self.origin_z + 1; // raise off floor a bit
|
||||
droptofloor(0,0);
|
||||
|
||||
|
@ -115,21 +112,18 @@ void() walkmonster_start_go =
|
|||
}
|
||||
|
||||
// spread think times so they don't all happen at same time
|
||||
self.nextthink = self.nextthink + random()*0.5;
|
||||
self.nextthink = time + 0.1 + random()*0.5;
|
||||
};
|
||||
|
||||
|
||||
void() walkmonster_start =
|
||||
{
|
||||
// delay drop to floor to make sure all doors have been spawned
|
||||
// spread think times so they don't all happen at same time
|
||||
self.nextthink = self.nextthink + random()*0.5;
|
||||
self.nextthink = time + 0.1 + random()*0.5;
|
||||
self.think = walkmonster_start_go;
|
||||
total_monsters = total_monsters + 1;
|
||||
};
|
||||
|
||||
|
||||
|
||||
void() flymonster_start_go =
|
||||
{
|
||||
self.takedamage = DAMAGE_AIM;
|
||||
|
@ -171,12 +165,15 @@ void() flymonster_start_go =
|
|||
self.pausetime = 99999999;
|
||||
self.th_stand ();
|
||||
}
|
||||
|
||||
self.nextthink = time + 0.1 + random()*0.5;
|
||||
};
|
||||
|
||||
void() flymonster_start =
|
||||
{
|
||||
self.flags = self.flags | FL_FLY;
|
||||
// spread think times so they don't all happen at same time
|
||||
self.nextthink = self.nextthink + random()*0.5;
|
||||
self.nextthink = time + 0.1 + random()*0.5;
|
||||
self.think = flymonster_start_go;
|
||||
total_monsters = total_monsters + 1;
|
||||
};
|
||||
|
@ -191,7 +188,6 @@ void() swimmonster_start_go =
|
|||
}
|
||||
|
||||
self.takedamage = DAMAGE_AIM;
|
||||
//total_monsters = total_monsters + 1;
|
||||
|
||||
self.ideal_yaw = self.angles * '0 1 0';
|
||||
if (!self.yaw_speed)
|
||||
|
@ -222,13 +218,14 @@ void() swimmonster_start_go =
|
|||
}
|
||||
|
||||
// spread think times so they don't all happen at same time
|
||||
self.nextthink = self.nextthink + random()*0.5;
|
||||
self.nextthink = time + 0.1 + random()*0.5;
|
||||
};
|
||||
|
||||
void() swimmonster_start =
|
||||
{
|
||||
self.flags = self.flags | FL_SWIM;
|
||||
// spread think times so they don't all happen at same time
|
||||
self.nextthink = self.nextthink + random()*0.5;
|
||||
self.nextthink = time + 0.1 + random()*0.5;
|
||||
self.think = swimmonster_start_go;
|
||||
total_monsters = total_monsters + 1;
|
||||
};
|
||||
|
|
2
ogre.qc
2
ogre.qc
|
@ -245,7 +245,7 @@ void() ogre_smash8 =[ $smash8, ogre_smash9 ] {ai_charge(10); chainsaw(0);};
|
|||
void() ogre_smash9 =[ $smash9, ogre_smash10 ] {ai_charge(13); chainsaw(0);};
|
||||
void() ogre_smash10 =[ $smash10, ogre_smash11 ] {chainsaw(1);};
|
||||
void() ogre_smash11 =[ $smash11, ogre_smash12 ] {ai_charge(2); chainsaw(0);
|
||||
self.nextthink = self.nextthink + random()*0.2;}; // slight variation
|
||||
self.nextthink = time + 0.1 + random()*0.2;}; // slight variation
|
||||
void() ogre_smash12 =[ $smash12, ogre_smash13 ] {ai_charge(0);};
|
||||
void() ogre_smash13 =[ $smash13, ogre_smash14 ] {ai_charge(4);};
|
||||
void() ogre_smash14 =[ $smash14, ogre_run1 ] {ai_charge(12);};
|
||||
|
|
20
player.qc
20
player.qc
|
@ -265,7 +265,9 @@ local float rs;
|
|||
// slime pain sounds
|
||||
if (self.watertype == CONTENT_SLIME)
|
||||
{
|
||||
// FIX ME put in some steam here
|
||||
// [slipyx] add bubbles
|
||||
if (self.waterlevel == 3) DeathBubbles (1);
|
||||
|
||||
if (random() > 0.5)
|
||||
sound (self, CHAN_VOICE, "player/lburn1.wav", 1, ATTN_NORM);
|
||||
else
|
||||
|
@ -358,8 +360,12 @@ void() player_die_ax1;
|
|||
void() DeathBubblesSpawn =
|
||||
{
|
||||
local entity bubble;
|
||||
if (self.owner.waterlevel != 3)
|
||||
// [slipyx] improved and fix bubble spawn
|
||||
if ((self.owner.waterlevel != 3) && (self.owner.health > 0))
|
||||
{
|
||||
remove (self);
|
||||
return;
|
||||
}
|
||||
bubble = spawn();
|
||||
setmodel (bubble, "progs/s_bubble.spr");
|
||||
setorigin (bubble, self.owner.origin + '0 0 24');
|
||||
|
@ -372,7 +378,7 @@ local entity bubble;
|
|||
bubble.frame = 0;
|
||||
bubble.cnt = 0;
|
||||
setsize (bubble, '-8 -8 -8', '8 8 8');
|
||||
self.nextthink = time + 0.1;
|
||||
self.nextthink = time + 0.01;
|
||||
self.think = DeathBubblesSpawn;
|
||||
self.air_finished = self.air_finished + 1;
|
||||
if (self.air_finished >= self.bubble_count)
|
||||
|
@ -387,12 +393,11 @@ local entity bubble_spawner;
|
|||
setorigin (bubble_spawner, self.origin);
|
||||
bubble_spawner.movetype = MOVETYPE_NONE;
|
||||
bubble_spawner.solid = SOLID_NOT;
|
||||
bubble_spawner.nextthink = time + 0.1;
|
||||
bubble_spawner.nextthink = time + 0.01;
|
||||
bubble_spawner.think = DeathBubblesSpawn;
|
||||
bubble_spawner.air_finished = 0;
|
||||
bubble_spawner.owner = self;
|
||||
bubble_spawner.bubble_count = num_bubbles;
|
||||
return;
|
||||
};
|
||||
|
||||
|
||||
|
@ -533,12 +538,13 @@ void() GibPlayer =
|
|||
void() PlayerDie =
|
||||
{
|
||||
local float i;
|
||||
|
||||
self.items = self.items - (self.items & IT_INVISIBILITY);
|
||||
|
||||
self.items = self.items - (self.items & (IT_INVISIBILITY));
|
||||
self.invisible_finished = 0; // don't die as eyes
|
||||
self.invincible_finished = 0;
|
||||
self.super_damage_finished = 0;
|
||||
self.radsuit_finished = 0;
|
||||
self.effects = 0; // [slipyx] reset effects on death
|
||||
self.modelindex = modelindex_player; // don't use eyes
|
||||
|
||||
if (deathmatch || coop)
|
||||
|
|
|
@ -222,7 +222,7 @@ void() sham_magic1 =[ $magic1, sham_magic2 ] {ai_face();
|
|||
sound (self, CHAN_WEAPON, "shambler/sattck1.wav", 1, ATTN_NORM);
|
||||
};
|
||||
void() sham_magic2 =[ $magic2, sham_magic3 ] {ai_face();};
|
||||
void() sham_magic3 =[ $magic3, sham_magic4 ] {ai_face();self.nextthink = self.nextthink + 0.2;
|
||||
void() sham_magic3 =[ $magic3, sham_magic4 ] {ai_face();self.nextthink = time + 0.2;
|
||||
local entity o;
|
||||
|
||||
self.effects = self.effects | EF_MUZZLEFLASH;
|
||||
|
|
|
@ -1315,7 +1315,9 @@ void() W_WeaponFrame =
|
|||
if (time < self.attack_finished)
|
||||
return;
|
||||
|
||||
ImpulseCommands ();
|
||||
// [slipyx] only check impulse if needed
|
||||
if (self.impulse)
|
||||
ImpulseCommands ();
|
||||
|
||||
// check for attack
|
||||
if (self.button0)
|
||||
|
|
|
@ -353,7 +353,7 @@ sound (self, CHAN_BODY, "zombie/z_fall.wav", 1, ATTN_NORM);
|
|||
self.solid = SOLID_NOT;
|
||||
self.wad = "ZOM_GND"; // hack for on ground flag
|
||||
};
|
||||
void() zombie_paine11 =[ $paine11, zombie_paine12 ] {self.nextthink = self.nextthink + 5;self.health = 60;};
|
||||
void() zombie_paine11 =[ $paine11, zombie_paine12 ] {self.nextthink = time + 5;self.health = 60;};
|
||||
void() zombie_paine12 =[ $paine12, zombie_paine13 ]{
|
||||
// see if ok to stand up
|
||||
self.health = 60;
|
||||
|
|
Loading…
Reference in New Issue