typefrag-patch.diff

patch that changes typefragging logic - BlaXpirit, 07/04/2012 06:11 pm

Download (4.04 KB)

View differences:

qcsrc/server/cl_client.qc
472 472
	self.invincible_finished = 0;
473 473
	self.superweapons_finished = 0;
474 474
	self.pushltime = 0;
475
	self.istypefrag = 0;
475 476
	self.think = SUB_Null;
476 477
	self.nextthink = 0;
477 478
	self.hook_time = 0;
qcsrc/server/cl_player.qc
123 123

  
124 124
.entity pusher;
125 125
.float pushltime;
126
.float istypefrag;
126 127

  
127 128
.float CopyBody_nextthink;
128 129
.void(void) CopyBody_think;
......
580 581
		// don't reset pushltime for self damage as it may be an attempt to
581 582
		// escape a lava pit or similar
582 583
		//self.pushltime = 0;
584
		self.istypefrag = 0;
583 585
	}
584 586
	else if(attacker.classname == "player")
585 587
	{
586 588
		self.pusher = attacker;
587 589
		self.pushltime = time + autocvar_g_maxpushtime;
590
		self.istypefrag = self.BUTTON_CHAT;
588 591
	}
589 592
	else if(time < self.pushltime)
590 593
	{
......
592 595
		self.pushltime = max(self.pushltime, time + 0.6);
593 596
	}
594 597
	else
598
	{
595 599
		self.pushltime = 0;
600
		self.istypefrag = 0;
601
	}
596 602

  
597 603
	float abot, vbot, awep;
598 604
	abot = (clienttype(attacker) == CLIENTTYPE_BOT);
qcsrc/server/g_damage.qc
55 55
.float teamkill_soundtime;
56 56
.entity teamkill_soundsource;
57 57
.entity pusher;
58
.float istypefrag;
58 59
.float taunt_soundtime;
59 60

  
60 61

  
......
420 421
					PlayerStats_Event(targ, PLAYERSTATS_ACHIEVEMENT_FIRSTVICTIM, 1);
421 422
				}
422 423

  
423
				if(targ.BUTTON_CHAT) {
424
				if(targ.istypefrag) {
424 425
					Send_CSQC_KillCenterprint(attacker, s, Obituary_ExtraFragInfo(targ), KILL_TYPEFRAG, MSG_KILL);
425 426
					Send_CSQC_KillCenterprint(targ, a, Obituary_ExtraFragInfo(attacker), KILL_TYPEFRAGGED, MSG_KILL);
426 427
				} else {
qcsrc/server/g_hook.qc
213 213
						self.aiment.flags &~= FL_ONGROUND;
214 214
						self.aiment.pusher = self.realowner;
215 215
						self.aiment.pushltime = time + autocvar_g_maxpushtime;
216
						self.aiment.istypefrag = self.aiment.BUTTON_CHAT;
216 217
					}
217 218
				}
218 219

  
......
285 286
		{
286 287
			self.realowner.pusher = attacker;
287 288
			self.realowner.pushltime = time + autocvar_g_maxpushtime;
289
			self.realowner.istypefrag = self.realowner.BUTTON_CHAT;
288 290
		}
289 291
		RemoveGrapplingHook(self.realowner);
290 292
	}
qcsrc/server/t_jumppads.qc
2 2
float PUSH_SILENT		= 2;
3 3

  
4 4
.float pushltime;
5
.float istypefrag;
5 6
.float height;
6 7

  
7 8
void() SUB_UseTargets;
......
213 214

  
214 215
		// reset tracking of who pushed you into a hazard (for kill credit)
215 216
		other.pushltime = 0;
217
		other.istypefrag = 0;
216 218
	}
217 219

  
218 220
	if(self.enemy.target)
qcsrc/server/t_teleporters.qc
131 131
		{
132 132
			player.pusher = teleporter.owner;
133 133
			player.pushltime = time + autocvar_g_maxpushtime;
134
			player.istypefrag = player.BUTTON_CHAT;
134 135
		}
135 136
		else
136 137
		{
137 138
			player.pushltime = 0;
139
			player.istypefrag = 0;
138 140
		}
139 141

  
140 142
		player.lastteleporttime = time;