From: TimePath Date: Tue, 29 Dec 2015 03:08:30 +0000 (+1100) Subject: Whitespace police X-Git-Tag: xonotic-v0.8.2~1365 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=de6feb449a0c2642efcb33ad774a4fc0304ba606;p=xonotic%2Fxonotic-data.pk3dir.git Whitespace police --- diff --git a/qcsrc/Makefile b/qcsrc/Makefile index fd566d714..6e0f04365 100644 --- a/qcsrc/Makefile +++ b/qcsrc/Makefile @@ -3,7 +3,7 @@ PERL ?= perl 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 diff --git a/qcsrc/client/scoreboard.qc b/qcsrc/client/scoreboard.qc index 9c86d9e4c..44b820ebc 100644 --- a/qcsrc/client/scoreboard.qc +++ b/qcsrc/client/scoreboard.qc @@ -608,17 +608,17 @@ string HUD_GetField(entity pl, int field) 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]; diff --git a/qcsrc/common/minigames/minigame/bd.qc b/qcsrc/common/minigames/minigame/bd.qc index ed84b6469..84120e1b0 100644 --- a/qcsrc/common/minigames/minigame/bd.qc +++ b/qcsrc/common/minigames/minigame/bd.qc @@ -595,7 +595,7 @@ int bd_server_event(entity minigame, string event, ...) minigame.bd_levelname = strzone(autocvar_sv_minigames_bulldozer_startlevel); bd_setup_pieces(minigame); minigame.minigame_flags = BD_TURN_MOVE; - + return true; } case "end": @@ -625,7 +625,7 @@ int bd_server_event(entity minigame, string event, ...) 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))); @@ -640,7 +640,7 @@ int bd_server_event(entity minigame, string event, ...) 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; } @@ -672,7 +672,7 @@ int bd_server_event(entity minigame, string event, ...) return false; } } - + return false; } @@ -714,7 +714,7 @@ void bd_hud_board(vector pos, vector mySize) 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); @@ -751,10 +751,10 @@ void bd_hud_board(vector pos, vector 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 ); - } + } } } @@ -809,17 +809,17 @@ void bd_hud_board(vector pos, vector mySize) 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); } } @@ -890,7 +890,7 @@ string bd_turn_to_string(int turnflags) if ( turnflags & BD_TURN_MOVE ) return _("Push the boulders onto the targets"); - + return ""; } diff --git a/qcsrc/common/minigames/minigame/snake.qc b/qcsrc/common/minigames/minigame/snake.qc index 67aa51d6e..33868ad57 100644 --- a/qcsrc/common/minigames/minigame/snake.qc +++ b/qcsrc/common/minigames/minigame/snake.qc @@ -294,7 +294,7 @@ void snake_eat_team(entity minigame, int pteam) 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) @@ -415,7 +415,7 @@ int snake_server_event(entity minigame, string event, ...) } else minigame.snake_lives[1] = 1; - + return true; } case "end": @@ -465,8 +465,8 @@ int snake_server_event(entity minigame, string event, ...) { 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; } @@ -506,7 +506,7 @@ int snake_server_event(entity minigame, string event, ...) return false; } } - + return false; } @@ -539,7 +539,7 @@ void snake_hud_board(vector pos, vector mySize) 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); @@ -633,7 +633,7 @@ void snake_hud_board(vector pos, vector mySize) } else { - minigame_drawpic_centered( tile_pos, + minigame_drawpic_centered( tile_pos, minigame_texture(thepiece), tile_size, tile_color, panel_fg_alpha, DRAWFLAG_NORMAL ); } @@ -654,17 +654,17 @@ void snake_hud_board(vector pos, vector mySize) 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); } } @@ -726,7 +726,7 @@ string snake_turn_to_string(int turnflags) 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"); @@ -735,7 +735,7 @@ string snake_turn_to_string(int turnflags) return _("Avoid the snake's body, collect the mice!"); else return _("Avoid the screen edges and the snake's body, collect the mice!"); - + return ""; } diff --git a/qcsrc/common/monsters/monster.qh b/qcsrc/common/monsters/monster.qh index bfbd544e5..b8781cbf9 100644 --- a/qcsrc/common/monsters/monster.qh +++ b/qcsrc/common/monsters/monster.qh @@ -54,7 +54,7 @@ CLASS(Monster, Object) 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 */ diff --git a/qcsrc/common/mutators/mutator/buffs/buffs.qc b/qcsrc/common/mutators/mutator/buffs/buffs.qc index 9552bc767..27c039982 100644 --- a/qcsrc/common/mutators/mutator/buffs/buffs.qc +++ b/qcsrc/common/mutators/mutator/buffs/buffs.qc @@ -198,7 +198,7 @@ void buff_Respawn(entity this) 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); diff --git a/qcsrc/common/t_items.qc b/qcsrc/common/t_items.qc index 6505d8911..da360c80d 100644 --- a/qcsrc/common/t_items.qc +++ b/qcsrc/common/t_items.qc @@ -1184,7 +1184,7 @@ void _StartItem(entity this, entity def, float defaultrespawntime, float default if (!(this.spawnflags & 1024)) { if(def.instanceOfPowerup) this.ItemStatus |= ITS_ANIMATE1; - + if(this.armorvalue || this.health) this.ItemStatus |= ITS_ANIMATE2; } diff --git a/qcsrc/dpdefs/doc.md b/qcsrc/dpdefs/doc.md index e5c19ca77..302c5d806 100644 --- a/qcsrc/dpdefs/doc.md +++ b/qcsrc/dpdefs/doc.md @@ -43,11 +43,11 @@ void CSQC_Shutdown(); // 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; ``` @@ -123,7 +123,7 @@ void SV_OnEntityPostSpawnFunction(); void SetNewParms(); // input: -// +// .bool customizeentityforclient(); // input: diff --git a/qcsrc/server/command/common.qc b/qcsrc/server/command/common.qc index 42420ee2d..8fd5fb047 100644 --- a/qcsrc/server/command/common.qc +++ b/qcsrc/server/command/common.qc @@ -245,7 +245,7 @@ void timeout_handler_think() // 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; )); diff --git a/qcsrc/server/mutators/mutator/gamemode_freezetag.qc b/qcsrc/server/mutators/mutator/gamemode_freezetag.qc index b018baca0..d7b01a0d4 100644 --- a/qcsrc/server/mutators/mutator/gamemode_freezetag.qc +++ b/qcsrc/server/mutators/mutator/gamemode_freezetag.qc @@ -513,7 +513,7 @@ MUTATOR_HOOKFUNCTION(ft, PlayerPreThink, CBC_ORDER_FIRST) ++n; } )); - + } if(n && self.frozen == 1) // OK, there is at least one teammate reviving us diff --git a/qcsrc/server/scores_rules.qc b/qcsrc/server/scores_rules.qc index 2071b0c32..80836bcb3 100644 --- a/qcsrc/server/scores_rules.qc +++ b/qcsrc/server/scores_rules.qc @@ -31,7 +31,7 @@ void ScoreRules_basics(float teams, float sprio, float stprio, float score_enabl 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); }