This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//do constant damage to everything in a sphere centered at 'origin' and ignoring one entity | |
//inflictor - this is legacy quake stuff -passed on to tdamage - use as in other damage/rad damage calls | |
//origin - the center of the area effect | |
//attacker - this is legacy quake stuff -passed on to tdamage - use as in other damage/rad damage calls | |
//radius - radius of damage area | |
//damage - damage applied to all things in radius - distance from center has no effect | |
//ignore - this entity will get no damage from this call | |
void(entity inflictor, vector origin, entity attacker, float radius, float damage, entity ignore) areaDMG = | |
{ | |
local entity head = findradius(origin, radius); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.float wait_after_show_time; // during gameplay this is set to the time to start showing a player's name under the crosshair - .2 seconds after he is under it | |
.float wait_before_show_time; // during gameplay this is set to the time to stop showing a player's name no longer under the crosshair | |
.float cleared_name; //to avaoid spamming only send centerprint once every .5 seconds | |
// print the name of the player under the crosshair in the middle of the screen | |
// meant to be called every frame (ie in PlayerPreThink) | |
void() printPlayerUnderCrosshair= | |
{ | |
local vector source; | |
local float hasInviz; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//some testing/snippets for svc_print in quakec | |
//msgTest1(MSG_ONE,self); - prints "hello there quakeworld!" | |
void(float msg_type, entity ent ) msgTest1= | |
{ | |
msg_entity = ent; | |
WriteByte(msg_type,SVC_PRINT); // SVC_PRINT | |
WriteShort(msg_type,3); // '3' is the number of writestrings including args | |
WriteString(msg_type,"{} there {}!"); | |
WriteString(msg_type,"hello"); |