QCCFLAGS_WATERMARK ?= -DWATERMARK='"$(shell git describe)"'
QCC ?= gmqcc
NDEBUG ?= 1
-
+
QCCVERSIONFILE := qccversion.$(shell (cd server && $(QCC) --version) > qccversion.txt && git hash-object qccversion.txt)
# We eventually need to get rid of these
case SP_DMG:
num = pl.(scores[SP_DMG]);
denom = 1000;
-
+
str = sprintf("%.1f k", num/denom);
return str;
-
+
case SP_DMGTAKEN:
num = pl.(scores[SP_DMGTAKEN]);
denom = 1000;
-
+
str = sprintf("%.1f k", num/denom);
- return str;
-
+ return str;
+
default:
tmp = pl.(scores[field]);
f = scores_flags[field];
minigame.bd_levelname = strzone(autocvar_sv_minigames_bulldozer_startlevel);
bd_setup_pieces(minigame);
minigame.minigame_flags = BD_TURN_MOVE;
-
+
return true;
}
case "end":
switch(argv(0))
{
case "move":
- bd_do_move(minigame, ...(0,entity), ((...(1,int)) >= 2 ? argv(1) : string_null), ((...(1,int)) >= 3 ? argv(2) : string_null), ((...(1,int)) >= 4 ? argv(3) : string_null));
+ bd_do_move(minigame, ...(0,entity), ((...(1,int)) >= 2 ? argv(1) : string_null), ((...(1,int)) >= 3 ? argv(2) : string_null), ((...(1,int)) >= 4 ? argv(3) : string_null));
return true;
case "next":
bd_next_match(minigame,...(0,entity), ((...(1,int) >= 2 ? argv(1) : string_null)));
bd_close_editor(minigame);
return true;
case "fill":
- bd_do_fill(minigame, ...(0,entity), ((...(1,int)) >= 2 ? argv(1) : string_null), ((...(1,int)) >= 3 ? argv(2) : string_null));
+ bd_do_fill(minigame, ...(0,entity), ((...(1,int)) >= 2 ? argv(1) : string_null), ((...(1,int)) >= 3 ? argv(2) : string_null));
return true;
}
return false;
}
}
-
+
return false;
}
minigame_hud_fitsqare(pos, mySize);
bd_boardpos = pos;
bd_boardsize = mySize;
-
+
minigame_hud_simpleboard(pos,mySize,minigame_texture("bd/board"));
vector tile_size = minigame_hud_denormalize_size('1 1 0' / BD_TILE_SIZE,pos,mySize);
if(e.bd_enemy)
thepiece = "bd/boulder_target";
- minigame_drawpic_centered( tile_pos,
+ minigame_drawpic_centered( tile_pos,
minigame_texture(thepiece),
tile_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL );
- }
+ }
}
}
if(active_minigame.minigame_flags & BD_TURN_WIN)
victory_text = "Well done! Click 'Next Level' to continue";
-
+
vector win_pos = pos+eY*(mySize_y-winfs_y)/2;
vector win_sz;
win_sz = minigame_drawcolorcodedstring_wrapped(mySize_x,win_pos,
- sprintf("%s", victory_text),
+ sprintf("%s", victory_text),
winfs, 0, DRAWFLAG_NORMAL, 0.5);
-
+
drawfill(win_pos-eY*hud_fontsize_y,win_sz+2*eY*hud_fontsize_y,'0.3 0.3 1',0.8,DRAWFLAG_ADDITIVE);
-
+
minigame_drawcolorcodedstring_wrapped(mySize_x,win_pos,
- sprintf("%s", victory_text),
+ sprintf("%s", victory_text),
winfs, panel_fg_alpha, DRAWFLAG_NORMAL, 0.5);
}
}
if ( turnflags & BD_TURN_MOVE )
return _("Push the boulders onto the targets");
-
+
return "";
}
minigame.snake_lost_teams |= BIT(pteam);
if(pl && minigame.snake_lives[pteam] > 0)
- minigame_setup_snake(minigame, pteam);
+ minigame_setup_snake(minigame, pteam);
}
void snake_move_head(entity minigame, entity head)
}
else
minigame.snake_lives[1] = 1;
-
+
return true;
}
case "end":
{
switch(argv(0))
{
- case "move":
- snake_move(minigame, ...(0,entity), ((...(1,int)) >= 2 ? argv(1) : string_null), ((...(1,int)) == 3 ? argv(2) : string_null));
+ case "move":
+ snake_move(minigame, ...(0,entity), ((...(1,int)) >= 2 ? argv(1) : string_null), ((...(1,int)) == 3 ? argv(2) : string_null));
return true;
}
return false;
}
}
-
+
return false;
}
minigame_hud_fitsqare(pos, mySize);
snake_boardpos = pos;
snake_boardsize = mySize;
-
+
minigame_hud_simpleboard(pos,mySize,minigame_texture("snake/board"));
vector tile_size = minigame_hud_denormalize_size('1 1 0' / SNAKE_TILE_SIZE,pos,mySize);
}
else
{
- minigame_drawpic_centered( tile_pos,
+ minigame_drawpic_centered( tile_pos,
minigame_texture(thepiece),
tile_size, tile_color, panel_fg_alpha, DRAWFLAG_NORMAL );
}
victory_text = "You win!";
if(active_minigame.snake_lives[minigame_self.team] <= 0)
victory_text = "You ran out of lives!";
-
+
vector win_pos = pos+eY*(mySize_y-winfs_y)/2;
vector win_sz;
win_sz = minigame_drawcolorcodedstring_wrapped(mySize_x,win_pos,
- sprintf("%s %s", victory_text, scores_text),
+ sprintf("%s %s", victory_text, scores_text),
winfs, 0, DRAWFLAG_NORMAL, 0.5);
-
+
drawfill(win_pos-eY*hud_fontsize_y,win_sz+2*eY*hud_fontsize_y,'0.3 0.3 1',0.8,DRAWFLAG_ADDITIVE);
-
+
minigame_drawcolorcodedstring_wrapped(mySize_x,win_pos,
- sprintf("%s %s", victory_text, scores_text),
+ sprintf("%s %s", victory_text, scores_text),
winfs, panel_fg_alpha, DRAWFLAG_NORMAL, 0.5);
}
}
if(active_minigame.snake_lives[minigame_self.team] <= 0)
return _("You ran out of lives!");
-
+
if ( (snake_find_head(active_minigame, minigame_self.team)).snake_dir == '0 0 0' )
return _("Press an arrow key to begin the game");
return _("Avoid the snake's body, collect the mice!");
else
return _("Avoid the screen edges and the snake's body, collect the mice!");
-
+
return "";
}
ATTRIB(Monster, mins, vector, '-0 -0 -0')
/** hitbox size */
ATTRIB(Monster, maxs, vector, '0 0 0')
-
+
/** (SERVER) setup monster data */
METHOD(Monster, mr_setup, bool(Monster this)) { return false; }
/** (SERVER) logic to run every frame */
vector oldbufforigin = this.origin;
this.velocity = '0 0 200';
- if(!MoveToRandomMapLocation(this, DPCONTENTS_SOLID | DPCONTENTS_CORPSE | DPCONTENTS_PLAYERCLIP, DPCONTENTS_SLIME | DPCONTENTS_LAVA | DPCONTENTS_SKY | DPCONTENTS_BODY | DPCONTENTS_DONOTENTER, Q3SURFACEFLAG_SKY,
+ if(!MoveToRandomMapLocation(this, DPCONTENTS_SOLID | DPCONTENTS_CORPSE | DPCONTENTS_PLAYERCLIP, DPCONTENTS_SLIME | DPCONTENTS_LAVA | DPCONTENTS_SKY | DPCONTENTS_BODY | DPCONTENTS_DONOTENTER, Q3SURFACEFLAG_SKY,
((autocvar_g_buffs_random_location_attempts > 0) ? autocvar_g_buffs_random_location_attempts : 10), 1024, 256))
{
entity spot = SelectSpawnPoint(true);
if (!(this.spawnflags & 1024)) {
if(def.instanceOfPowerup)
this.ItemStatus |= ITS_ANIMATE1;
-
+
if(this.armorvalue || this.health)
this.ItemStatus |= ITS_ANIMATE2;
}
// v_forward: forward
// v_right: right
// v_up: up
-// trace_endpos: visorigin
+// trace_endpos: visorigin
.vector camera_transform(vector pos, vector ang);
// control start position of sound()
-// calculated as ofs = time - sound_starttime
+// calculated as ofs = time - sound_starttime
float sound_starttime;
```
void SetNewParms();
// input:
-//
+//
.bool customizeentityforclient();
// input:
// reset all the flood variables
FOREACH_CLIENT(true, LAMBDA(
- it.nickspamcount = it.nickspamtime = it.floodcontrol_chat =
+ it.nickspamcount = it.nickspamtime = it.floodcontrol_chat =
it.floodcontrol_chatteam = it.floodcontrol_chattell =
it.floodcontrol_voice = it.floodcontrol_voiceteam = 0;
));
++n;
}
));
-
+
}
if(n && self.frozen == 1) // OK, there is at least one teammate reviving us
if(score_enabled)
ScoreInfo_SetLabel_PlayerScore(SP_SCORE, "score", sprio);
-
+
ScoreInfo_SetLabel_PlayerScore(SP_DMG, "damage", 0);
ScoreInfo_SetLabel_PlayerScore(SP_DMGTAKEN, "damagetaken", SFL_LOWER_IS_BETTER);
}