diff options
author | Paweł Redman <trem.redman@gmail.com> | 2013-09-09 00:42:43 +0200 |
---|---|---|
committer | Paweł Redman <trem.redman@gmail.com> | 2013-09-09 00:42:43 +0200 |
commit | 27a16fb1fa69d458fb10e6437eb07b85496b46b8 (patch) | |
tree | 70a520565f85e5b9c85cabcf7bc1024badc184af | |
parent | 5b6289ef53d06d005e94b20b3d45f7726588de99 (diff) |
0.1.2 and code cleanup
-rw-r--r-- | assets/credits.txt | 15 | ||||
-rw-r--r-- | assets/models/players/human_base/h_helmet_mk2.tga | bin | 262188 -> 262188 bytes | |||
-rw-r--r-- | assets/sound/buildables/mgturret/spinup_a.wav | bin | 0 -> 53106 bytes | |||
-rw-r--r-- | assets/sound/buildables/mgturret/spinup_b.wav | bin | 0 -> 61926 bytes | |||
-rw-r--r-- | assets/sound/buildables/mgturret/turretkill_a.wav | bin | 0 -> 114846 bytes | |||
-rw-r--r-- | assets/ui/ingame_options.menu | 23 | ||||
-rw-r--r-- | assets/ui/teamscore.menu | 386 | ||||
-rw-r--r-- | src/cgame/cg_buildable.c | 206 | ||||
-rw-r--r-- | src/cgame/cg_event.c | 16 | ||||
-rw-r--r-- | src/cgame/cg_local.h | 12 | ||||
-rw-r--r-- | src/cgame/cg_main.c | 12 | ||||
-rw-r--r-- | src/cgame/cg_weapons.c | 3 | ||||
-rw-r--r-- | src/game/bg_misc.c | 13 | ||||
-rw-r--r-- | src/game/bg_public.h | 3 | ||||
-rw-r--r-- | src/game/g_active.c | 7 | ||||
-rw-r--r-- | src/game/g_cmds.c | 11 | ||||
-rw-r--r-- | src/game/g_combat.c | 48 |
17 files changed, 613 insertions, 142 deletions
diff --git a/assets/credits.txt b/assets/credits.txt index 126f22e..21f6a68 100644 --- a/assets/credits.txt +++ b/assets/credits.txt @@ -6,6 +6,17 @@ Cuboid - a Tremulous 1.2 mod focused on cuboids and fixing balance issues. Version Release date ______________________________________________________________________________________________ +0.1.2 Sep 09 2013 +GAMEPLAY +- Wall impact effects no longer appear on players or buildables (the MD passing through players bug). +- Now it takes longer for Biores to start healing after the human is hurt. +NON-GAMEPLAY: +- Added a death obituary for being killed with a rantbomb. +- Replaced Turret spinup sound. +- Turrets now play a sound after killing their target. +- It's now possible to change the resizing speed for cuboids (via menu or cg.cuboidResizeRate). +- Scoretable now displays high amounts of score properly. + 0.1.1 Sep 07 2013 GAMEPLAY: - Rebalanced Cuboids. @@ -13,7 +24,6 @@ GAMEPLAY: - Decreased jump stamina take by 40% (it's now possible to perform ca. 66% more jumps without replenishing stamina). - Limited the amount of Defense Computers that can simultaneously heal a single buildable. - Non-repairable cuboids (like concrete or glass) can no longer be healed by Defense Computers. -- All cuboids are now non-solid while being built. NON-GAMEPLAY: - Added missing Human Impregnation Mod assets. - Updated Helmet Mk2's texture (still not final). @@ -134,7 +144,8 @@ sound/upgrades/jetpack/refuel.wav joeseshon @ freesound.org, alexmol @ freesound.org, Pikachu cc-by ui/help.txt theinvsblman cc-by ui/ingame_options.menu Darklegion Development, theinvsblman cc-by-sa -ui/menudef.h Darklegion Development cc-by-s +ui/teamscore.menu Darklegion Development, theinvsblman cc-by-sa +ui/menudef.h Darklegion Development cc-by-sa vm/*.qvm authors denoted in Programming section GPL Terms of the Creative Commons licenses (includes the Sampling Plus license) can be found at: http://creativecommons.org/licenses/. diff --git a/assets/models/players/human_base/h_helmet_mk2.tga b/assets/models/players/human_base/h_helmet_mk2.tga Binary files differindex 9df8c1c..79c5173 100644 --- a/assets/models/players/human_base/h_helmet_mk2.tga +++ b/assets/models/players/human_base/h_helmet_mk2.tga diff --git a/assets/sound/buildables/mgturret/spinup_a.wav b/assets/sound/buildables/mgturret/spinup_a.wav Binary files differnew file mode 100644 index 0000000..1da1ff2 --- /dev/null +++ b/assets/sound/buildables/mgturret/spinup_a.wav diff --git a/assets/sound/buildables/mgturret/spinup_b.wav b/assets/sound/buildables/mgturret/spinup_b.wav Binary files differnew file mode 100644 index 0000000..1ba55eb --- /dev/null +++ b/assets/sound/buildables/mgturret/spinup_b.wav diff --git a/assets/sound/buildables/mgturret/turretkill_a.wav b/assets/sound/buildables/mgturret/turretkill_a.wav Binary files differnew file mode 100644 index 0000000..183c555 --- /dev/null +++ b/assets/sound/buildables/mgturret/turretkill_a.wav diff --git a/assets/ui/ingame_options.menu b/assets/ui/ingame_options.menu index 1228b0e..e8b7d48 100644 --- a/assets/ui/ingame_options.menu +++ b/assets/ui/ingame_options.menu @@ -1535,7 +1535,7 @@ } } -//////// CHALLENGE-CUBOID +//////// CUBOID itemDef { @@ -1599,6 +1599,27 @@ } } + itemDef + { + name cuboid + group optionsGrp + type ITEM_TYPE_MULTI + text "Resizing rate::" + cvar "cg_cuboidResizeRate" + cvarFloatList { "0.1" 0.1 "0.2" 0.2 "0.5" 0.5 "1" 1 "2" 2 "5" 5 "10" 10 } + rect SCONTENT_X (SCONTENT_Y+(2*ELEM_H)) SCONTENT_W ELEM_H + textalign ALIGN_RIGHT + textvalign VALIGN_CENTER + textalignx SCONTENT_OFF + textscale .25 + forecolor 1 1 1 1 + visible MENU_FALSE + action + { + play "sound/misc/menu1.wav"; + } + } + //////// SYSTEM //System menu diff --git a/assets/ui/teamscore.menu b/assets/ui/teamscore.menu new file mode 100644 index 0000000..e100a05 --- /dev/null +++ b/assets/ui/teamscore.menu @@ -0,0 +1,386 @@ +#include "ui/menudef.h" + +{ + \\ score_menu \\ + +#define W 500 +#define H 338 +#define BORDER 10 + +#define TOFF 10 +#define SPEC_W 75 +#define BAR_H 30 + +#define LLIST_L 0 +#define LLIST_R (W/2) +#define RLIST_L (W/2) +#define RLIST_R W + + menuDef + { + name "teamscore_menu" + visible MENU_FALSE + fullscreen MENU_FALSE + rect (320-(W/2)) (240-(H/2)) W H + focusColor 1 .75 0 1 + style WINDOW_STYLE_EMPTY + + // TEAM NAME // + + itemDef + { + name teamNameWindow + rect 0 0 W BAR_H + style WINDOW_STYLE_FILLED + border WINDOW_BORDER_FULL + borderSize 1.0 + bordercolor .5 .5 .5 1 + forecolor 1 1 1 1 + backcolor 0 0 0 .8 + visible MENU_TRUE + decoration + } + + itemDef + { + name alienteamname + textalign ALIGN_LEFT + textvalign VALIGN_CENTER + textalignx TOFF + textscale 0.4 + rect 0 0 (W/3) BAR_H + forecolor 1 1 1 1 + decoration + visible MENU_TRUE + ownerdraw CG_ALIENS_SCORE_LABEL + } + + itemDef + { + name stagereport + textalign ALIGN_CENTER + textvalign VALIGN_CENTER + textscale 0.33 + rect (W/3) 0 (W/3) BAR_H + forecolor 1 1 1 1 + decoration + visible MENU_TRUE + ownerdraw CG_STAGE_REPORT_TEXT + } + + itemDef + { + name humanteamname + textalign ALIGN_RIGHT + textvalign VALIGN_CENTER + textalignx -TOFF + textscale 0.4 + rect ((2*W)/3) 0 (W/3) BAR_H + forecolor 1 1 1 1 + decoration + visible MENU_TRUE + ownerdraw CG_HUMANS_SCORE_LABEL + } + + // TEAM BARS // + + itemDef + { + name leftteambar + rect 0 (BAR_H+BORDER) (W/2) BAR_H + style WINDOW_STYLE_FILLED + border WINDOW_BORDER_FULL + borderSize 1.0 + bordercolor .5 .5 .5 1 + forecolor 1 1 1 1 + backcolor 0 0 0 .8 + visible MENU_TRUE + decoration + } + + itemDef + { + name rightteambar + rect (W/2) (BAR_H+BORDER) (W/2) BAR_H + style WINDOW_STYLE_FILLED + border WINDOW_BORDER_FULL + borderSize 1.0 + bordercolor .5 .5 .5 1 + forecolor 1 1 1 1 + backcolor 0 0 0 .8 + visible MENU_TRUE + decoration + } + + + // TEAM HEADINGS // + + itemDef + { + type ITEM_TYPE_TEXT + text "Status" + textscale .33 + style WINDOW_STYLE_EMPTY + rect (LLIST_L+10) (BAR_H+BORDER) 1 BAR_H + textalign ALIGN_LEFT + textvalign VALIGN_CENTER + backcolor 0 0 0 0 + forecolor 1 .75 0 1 + decoration + visible MENU_TRUE + } + + itemDef + { + type ITEM_TYPE_TEXT + text "Name" + textscale .33 + style WINDOW_STYLE_EMPTY + rect (LLIST_L+50) (BAR_H+BORDER) 1 BAR_H + textalign ALIGN_LEFT + textvalign VALIGN_CENTER + backcolor 0 0 0 0 + forecolor 1 .75 0 1 + decoration + visible MENU_TRUE + } + + itemDef + { + type ITEM_TYPE_TEXT + text "Score" + textscale .33 + style WINDOW_STYLE_EMPTY + rect (LLIST_R-95) (BAR_H+BORDER) 1 BAR_H + textalign ALIGN_RIGHT + textvalign VALIGN_CENTER + backcolor 0 0 0 0 + forecolor 1 .75 0 1 + decoration + visible MENU_TRUE + } + + itemDef + { + type ITEM_TYPE_TEXT + text "Time" + textscale .33 + style WINDOW_STYLE_EMPTY + rect (LLIST_R-55) (BAR_H+BORDER) 1 BAR_H + textalign ALIGN_RIGHT + textvalign VALIGN_CENTER + backcolor 0 0 0 0 + forecolor 1 .75 0 1 + decoration + visible MENU_TRUE + } + + itemDef + { + type ITEM_TYPE_TEXT + text "Ping" + textscale .33 + style WINDOW_STYLE_EMPTY + rect (LLIST_R-15) (BAR_H+BORDER) 1 BAR_H + textalign ALIGN_RIGHT + textvalign VALIGN_CENTER + backcolor 0 0 0 0 + forecolor 1 .75 0 1 + decoration + visible MENU_TRUE + } + + itemDef + { + type ITEM_TYPE_TEXT + text "Status" + textscale .33 + style WINDOW_STYLE_EMPTY + rect (RLIST_L+10) (BAR_H+BORDER) 1 BAR_H + textalign ALIGN_LEFT + textvalign VALIGN_CENTER + backcolor 0 0 0 0 + forecolor 1 .75 0 1 + decoration + visible MENU_TRUE + } + + itemDef + { + type ITEM_TYPE_TEXT + text "Name" + textscale .33 + style WINDOW_STYLE_EMPTY + rect (RLIST_L+50) (BAR_H+BORDER) 1 BAR_H + textalign ALIGN_LEFT + textvalign VALIGN_CENTER + backcolor 0 0 0 0 + forecolor 1 .75 0 1 + decoration + visible MENU_TRUE + } + + itemDef + { + type ITEM_TYPE_TEXT + text "Score" + textscale .33 + style WINDOW_STYLE_EMPTY + rect (RLIST_R-95) (BAR_H+BORDER) 1 BAR_H + textalign ALIGN_RIGHT + textvalign VALIGN_CENTER + backcolor 0 0 0 0 + forecolor 1 .75 0 1 + decoration + visible MENU_TRUE + } + + itemDef + { + type ITEM_TYPE_TEXT + text "Time" + textscale .33 + style WINDOW_STYLE_EMPTY + rect (RLIST_R-55) (BAR_H+BORDER) 1 BAR_H + textalign ALIGN_RIGHT + textvalign VALIGN_CENTER + backcolor 0 0 0 0 + forecolor 1 .75 0 1 + decoration + visible MENU_TRUE + } + + itemDef + { + type ITEM_TYPE_TEXT + text "Ping" + textscale .33 + style WINDOW_STYLE_EMPTY + rect (RLIST_R-15) (BAR_H+BORDER) 1 BAR_H + textalign ALIGN_RIGHT + textvalign VALIGN_CENTER + backcolor 0 0 0 0 + forecolor 1 .75 0 1 + decoration + visible MENU_TRUE + } + + itemDef + { + name leftlist + rect 0 ((2*BAR_H)+BORDER) (W/2) (H-((3*BAR_H)+(2*BORDER))) + style WINDOW_STYLE_FILLED + backcolor 0 0 0 .6 + border WINDOW_BORDER_FULL + borderSize 1.0 + bordercolor .5 .5 .5 1 + forecolor .75 .75 .75 1 + visible MENU_TRUE + type ITEM_TYPE_LISTBOX + elementwidth 135 + elementheight 16 + textscale .25 + elementtype LISTBOX_TEXT + feeder FEEDER_ALIENTEAM_LIST + notselectable + noscrollbar + columns 7 + 5 15 ALIGN_LEFT + 21 15 ALIGN_LEFT + 7 30 ALIGN_LEFT + 45 ((W/2)-170) ALIGN_LEFT + ((W/2)-140) 40 ALIGN_RIGHT + ((W/2)-80) 20 ALIGN_RIGHT + ((W/2)-40) 20 ALIGN_RIGHT + } + + itemDef + { + name rightlist + rect (W/2) ((2*BAR_H)+BORDER) (W/2) (H-((3*BAR_H)+(2*BORDER))) + style WINDOW_STYLE_FILLED + backcolor 0 0 0 .6 + border WINDOW_BORDER_FULL + borderSize 1.0 + bordercolor .5 .5 .5 1 + forecolor .75 .75 .75 1 + visible MENU_TRUE + type ITEM_TYPE_LISTBOX + elementwidth 135 + elementheight 16 + textscale .25 + elementtype LISTBOX_TEXT + feeder FEEDER_HUMANTEAM_LIST + notselectable + noscrollbar + columns 7 + 5 15 ALIGN_LEFT + 21 15 ALIGN_LEFT + 7 30 ALIGN_LEFT + 45 ((W/2)-170) ALIGN_LEFT + ((W/2)-140) 40 ALIGN_RIGHT + ((W/2)-80) 20 ALIGN_RIGHT + ((W/2)-40) 20 ALIGN_RIGHT + } + + // spectators // + + itemDef + { + name window + rect 0 (H-BAR_H) W BAR_H + style WINDOW_STYLE_FILLED + border WINDOW_BORDER_FULL + borderSize 1.0 + bordercolor .5 .5 .5 1 + backcolor 0 0 0 .8 + textscale .33 + visible MENU_TRUE + decoration + } + + itemDef + { + type ITEM_TYPE_TEXT + name window + text "Spectating:" + rect 0 (H-BAR_H) SPEC_W BAR_H + style WINDOW_STYLE_FILLED + forecolor 1 1 1 1 + textscale .33 + textalign ALIGN_LEFT + textvalign VALIGN_CENTER + textalignx TOFF + visible MENU_TRUE + decoration + } + + itemDef + { + name window + rect SPEC_W (H-BAR_H) (W-SPEC_W) BAR_H + style WINDOW_STYLE_FILLED + forecolor 1 1 1 1 + textscale .33 + textvalign VALIGN_CENTER + visible MENU_TRUE + ownerdraw CG_SPECTATORS + decoration + } + + itemDef + { + name winner + type ITEM_TYPE_TEXT + rect (W/2) (H+BAR_H) 0 0 + style WINDOW_STYLE_EMPTY + forecolor 1 1 1 1 + textscale 0.5 + textalign ALIGN_CENTER + textvalign VALIGN_TOP + visible MENU_TRUE + cvar "ui_winner" + decoration + } + } +} diff --git a/src/cgame/cg_buildable.c b/src/cgame/cg_buildable.c index 7b5b85d..b1d40b0 100644 --- a/src/cgame/cg_buildable.c +++ b/src/cgame/cg_buildable.c @@ -2127,83 +2127,85 @@ Server responded to our cb with either cb2 or cb3. */ void CG_Cuboid_Response(void) { - // cb2 <a> <b> <c> : server sets client-side cuboid - // cb3 <echo> : server agrees on player's cuboid - // cb3 <echo> <a> <b> <c> : server doesnt agree on player's cuboid and corrects it - static qboolean init=qfalse; - if(!BG_Buildable(cg.predictedPlayerState.stats[STAT_BUILDABLE]&~SB_VALID_TOGGLEBIT,NULL)->cuboid) - return; - if(!Q_stricmp(CG_Argv(0),"cb2")&&trap_Argc()==4) - { - cg.cuboidSelection[0]=atof(CG_Argv(1)); - cg.cuboidSelection[1]=atof(CG_Argv(2)); - cg.cuboidSelection[2]=atof(CG_Argv(3)); - return; - } - else if(!Q_stricmp(CG_Argv(0),"cb3")) - { - if(trap_Argc()==2) + // cb2 <a> <b> <c> : server sets client-side cuboid + // cb3 <echo> : server agrees on player's cuboid + // cb3 <echo> <a> <b> <c> : server doesnt agree on player's cuboid and corrects it + static qboolean init = qfalse; + + if( !BG_Buildable( cg.predictedPlayerState.stats[ STAT_BUILDABLE ] & ~SB_VALID_TOGGLEBIT, NULL )->cuboid ) + return; + + if( !Q_stricmp( CG_Argv( 0 ), "cb2" ) && trap_Argc( ) == 4 ) { - if(atoi(CG_Argv(1))==cg.latestCBNumber) - cg.forbidCuboids=qfalse; - return; + cg.cuboidSelection[ 0 ] = atof( CG_Argv( 1 ) ); + cg.cuboidSelection[ 1 ] = atof( CG_Argv( 2 ) ); + cg.cuboidSelection[ 2 ] = atof( CG_Argv( 3 ) ); + return; } - else if(trap_Argc()==5) + else if( !Q_stricmp( CG_Argv( 0 ), "cb3" ) ) { - cg.cuboidSelection[0]=atof(CG_Argv(2)); - cg.cuboidSelection[1]=atof(CG_Argv(3)); - cg.cuboidSelection[2]=atof(CG_Argv(4)); - if(atoi(CG_Argv(1))==cg.latestCBNumber) - { - cg.forbidCuboids=qfalse; - if(cg.lastCuboidError+250<cg.time) + if( trap_Argc( ) == 2 ) { - trap_S_StartLocalSound(cgs.media.cuboidErrorSound,CHAN_LOCAL_SOUND); - cg.lastCuboidError=cg.time; - } + if( atoi( CG_Argv( 1 ) ) == cg.latestCBNumber ) + cg.forbidCuboids = qfalse; + return; + } + else if( trap_Argc() == 5) + { + cg.cuboidSelection[ 0 ] = atof( CG_Argv( 2 ) ); + cg.cuboidSelection[ 1 ] = atof( CG_Argv( 3 ) ); + cg.cuboidSelection[ 2 ] = atof( CG_Argv( 4 ) ); + if( atoi( CG_Argv( 1 ) ) == cg.latestCBNumber ) + { + cg.forbidCuboids = qfalse; + if( cg.lastCuboidError + 250 < cg.time ) + { + trap_S_StartLocalSound( cgs.media.cuboidErrorSound, CHAN_LOCAL_SOUND ); + cg.lastCuboidError = cg.time; + } + } + return; } - return; - } } - Com_Printf("^3warning: wrong cb2/cb3 from server\n"); + Com_Printf( "^3warning: wrong cb2/cb3 from server\n" ); } /* ====================== -CG_CuboidRotate_f - -Rotate the cuboid selection 90 degrees around the current axis. -Syntax: - cuboidRotate +CG_CuboidResize_f ====================== */ void CG_CuboidResize(qboolean enlarge) { - vec3_t dims; - int rate=(enlarge?1:-1)*5; //FIXME: cvar for rate - if(!BG_Buildable(cg.predictedPlayerState.stats[STAT_BUILDABLE]&~SB_VALID_TOGGLEBIT,NULL)->cuboid) - return; - VectorCopy(cg.cuboidSelection,dims); - switch(cg_cuboidResizeAxis.integer) - { - case 0: - dims[0]+=rate; - break; - case 1: - dims[1]+=rate; - break; - default: - dims[2]+=rate; - break; - } - if(dims[0]<1||dims[1]<1||dims[2]<1|| - dims[0]*dims[1]*dims[2]<CUBOID_MINVOLUME ) - return; - if(enlarge) - trap_S_StartLocalSound(cgs.media.cuboidResizeSoundA,CHAN_LOCAL_SOUND); - else - trap_S_StartLocalSound(cgs.media.cuboidResizeSoundB,CHAN_LOCAL_SOUND); - VectorCopy(dims,cg.cuboidSelection); + vec3_t dims; + float rate = ( enlarge ? 1.0f : -1.0f ) * cg_cuboidResizeRate.value; + + if( !BG_Buildable( cg.predictedPlayerState.stats[ STAT_BUILDABLE ] & ~SB_VALID_TOGGLEBIT, NULL)->cuboid ) + return; + + VectorCopy( cg.cuboidSelection, dims ); + switch( cg_cuboidResizeAxis.integer ) + { + case 0: + dims[ 0 ] += rate; + break; + case 1: + dims[ 1 ] += rate; + break; + default: + dims[ 2 ] += rate; + break; + } + + if( dims[ 0 ] * dims[ 1 ] * dims[ 2 ] < CUBOID_MINVOLUME ) + return; + + if( enlarge ) + trap_S_StartLocalSound( cgs.media.cuboidResizeSoundA, CHAN_LOCAL_SOUND ); + else + trap_S_StartLocalSound( cgs.media.cuboidResizeSoundB, CHAN_LOCAL_SOUND ); + + VectorCopy( dims, cg.cuboidSelection ); } /* @@ -2218,25 +2220,24 @@ Syntax: #define SWAPFLOATS(a,b) {float __t;__t=a,a=b,b=__t;} void CG_CuboidRotate_f(void) { - int axis; + int axis; - if(!BG_Buildable(cg.predictedPlayerState.stats[STAT_BUILDABLE]&~SB_VALID_TOGGLEBIT,NULL)->cuboid) - return; - axis=cg_cuboidResizeAxis.integer; - switch(axis) - { - case 0: - SWAPFLOATS(cg.cuboidSelection[1],cg.cuboidSelection[2]); - break; - case 1: - SWAPFLOATS(cg.cuboidSelection[2],cg.cuboidSelection[0]); - break; - case 2: - SWAPFLOATS(cg.cuboidSelection[0],cg.cuboidSelection[1]); - break; - } - trap_S_StartLocalSound(cgs.media.cuboidRotateSound,CHAN_LOCAL_SOUND); - CG_Cuboid_Send(); + if( !BG_Buildable( cg.predictedPlayerState.stats[ STAT_BUILDABLE ] & ~SB_VALID_TOGGLEBIT, NULL )->cuboid ) + return; + switch( cg_cuboidResizeAxis.integer ) + { + case 0: + SWAPFLOATS( cg.cuboidSelection[ 1 ], cg.cuboidSelection[ 2 ] ); + break; + case 1: + SWAPFLOATS( cg.cuboidSelection[ 2 ], cg.cuboidSelection[ 0 ] ); + break; + case 2: + SWAPFLOATS( cg.cuboidSelection[ 0 ], cg.cuboidSelection[ 1 ] ); + break; + } + trap_S_StartLocalSound( cgs.media.cuboidRotateSound, CHAN_LOCAL_SOUND ); + CG_Cuboid_Send( ); } /* @@ -2251,22 +2252,22 @@ Syntax: */ void CG_CuboidAxis_f(void) { - int axis; + int axis; - axis=cg_cuboidResizeAxis.integer; - if(!BG_Buildable(cg.predictedPlayerState.stats[STAT_BUILDABLE]&~SB_VALID_TOGGLEBIT,NULL)->cuboid) - return; - if(!CG_Argv(1)) - { - Com_Printf("cuboidAxis next|0|1|2 : set axis on which you want to resize your cuboid selection (0 - X, 1 - Y, 2 - Z)\n"); - return; - } - if(!Q_stricmp(CG_Argv(1),"next")) - axis++; - else - axis=atoi(CG_Argv(1)); - trap_Cvar_Set("cg_cuboidResizeAxis",va("%i",(axis+3)%3)); - trap_S_StartLocalSound(cgs.media.cuboidAxisChangeSound,CHAN_LOCAL_SOUND); + axis = cg_cuboidResizeAxis.integer; + if( !BG_Buildable( cg.predictedPlayerState.stats[ STAT_BUILDABLE ] & ~SB_VALID_TOGGLEBIT, NULL )->cuboid) + return; + if( !CG_Argv( 1 ) ) + { + Com_Printf( "cuboidAxis next|0|1|2 : set axis on which you want to resize your cuboid selection (0 - X, 1 - Y, 2 - Z)\n" ); + return; + } + if( !Q_stricmp( CG_Argv( 1 ), "next" ) ) + axis++; + else + axis = atoi( CG_Argv( 1 ) ); + trap_Cvar_Set( "cg_cuboidResizeAxis", va( "%i" , ( axis + 3 ) % 3 ) ); + trap_S_StartLocalSound( cgs.media.cuboidAxisChangeSound, CHAN_LOCAL_SOUND ); } /* @@ -2280,11 +2281,12 @@ Otherwise send the normal +attack / -attack; */ void CG_CuboidAttack_f(void) { - if(BG_Buildable(cg.predictedPlayerState.stats[STAT_BUILDABLE]&~SB_VALID_TOGGLEBIT,NULL)->cuboid&&cg.forbidCuboids) - { - trap_S_StartLocalSound(cgs.media.cuboidErrorSound,CHAN_LOCAL_SOUND); - return; - } - trap_SendClientCommand(va("%s",CG_Argv(0))); + if( BG_Buildable( cg.predictedPlayerState.stats[ STAT_BUILDABLE ] & ~SB_VALID_TOGGLEBIT, NULL )->cuboid && + cg.forbidCuboids ) + { + trap_S_StartLocalSound( cgs.media.cuboidErrorSound, CHAN_LOCAL_SOUND ); + return; + } + trap_SendClientCommand( va( "%s", CG_Argv(0) ) ); } diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c index ec7b9a6..40df8b9 100644 --- a/src/cgame/cg_event.c +++ b/src/cgame/cg_event.c @@ -322,6 +322,12 @@ static void CG_Obituary( entityState_t *ent ) message = "was crushed under"; message2 = "'s weight"; break; + case MOD_LEVEL4_BOMB: + message = "was bombed by"; + Com_sprintf( className, 64, "'s %s", + BG_ClassConfig( PCL_ALIEN_LEVEL4 )->humanName ); + message2 = className; + break; case MOD_POISON: message = "should have used a medkit against"; @@ -966,7 +972,15 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) break; case EV_MGTURRET_SPINUP: - trap_S_StartSound( NULL, es->number, CHAN_AUTO, cgs.media.turretSpinupSound ); + if( random() >= 0.5f ) + trap_S_StartSound( NULL, es->number, CHAN_AUTO, cgs.media.turretSpinupSoundA ); + else + trap_S_StartSound( NULL, es->number, CHAN_AUTO, cgs.media.turretSpinupSoundB ); + break; + + + case EV_MGTURRET_KILL: + trap_S_StartSound( NULL, es->number, CHAN_AUTO, cgs.media.turretKillSound ); break; case EV_OVERMIND_SPAWNS: diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h index 95a6569..11133bf 100644 --- a/src/cgame/cg_local.h +++ b/src/cgame/cg_local.h @@ -1240,8 +1240,10 @@ typedef struct sfxHandle_t humanTalkSound; sfxHandle_t landSound; sfxHandle_t fallSound; - sfxHandle_t turretSpinupSound; - + sfxHandle_t turretSpinupSoundA; + sfxHandle_t turretSpinupSoundB; + sfxHandle_t turretKillSound; + sfxHandle_t hardBounceSound1; sfxHandle_t hardBounceSound2; @@ -1606,6 +1608,7 @@ extern vmCvar_t cg_emoticons; extern vmCvar_t cg_chatTeamPrefix; extern vmCvar_t cg_cuboidResizeAxis; +extern vmCvar_t cg_cuboidResizeRate; extern vmCvar_t cg_cuboidPSQuality; extern vmCvar_t cg_cuboidInfoX; extern vmCvar_t cg_cuboidInfoY; @@ -2168,10 +2171,11 @@ typedef enum // mod version data -#define MODVER_CURRENT 2 +#define MODVER_CURRENT 3 +#define MODVER_C2_0_1_2 3 #define MODVER_C2_0_1_1 2 #define MODVER_C2_0_1_0 1 -#define MODVER_TITLE "0.1.1 (Sep 07)" +#define MODVER_TITLE "0.1.2 (Sep 09)" diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c index 48df981..4191cc7 100644 --- a/src/cgame/cg_main.c +++ b/src/cgame/cg_main.c @@ -228,6 +228,7 @@ vmCvar_t cg_emoticons; vmCvar_t cg_chatTeamPrefix; vmCvar_t cg_cuboidResizeAxis; +vmCvar_t cg_cuboidResizeRate; vmCvar_t cg_cuboidPSQuality; vmCvar_t cg_cuboidInfoX; vmCvar_t cg_cuboidInfoY; @@ -370,10 +371,11 @@ static cvarTable_t cvarTable[ ] = { &cg_emoticons, "cg_emoticons", "1", CVAR_LATCH|CVAR_ARCHIVE}, - { &cg_chatTeamPrefix, "cg_chatTeamPrefix", "1", CVAR_ARCHIVE}, + { &cg_chatTeamPrefix, "cg_chatTeamPrefix", "1", CVAR_ARCHIVE }, - { &cg_cuboidResizeAxis, "cg_cuboidResizeAxis", "2", 0}, - { &cg_cuboidPSQuality, "cg_cuboidPSQuality", "3", CVAR_ARCHIVE}, + { &cg_cuboidResizeAxis, "cg_cuboidResizeAxis", "2", 0 }, + { &cg_cuboidResizeRate, "cg_cuboidResizeRate", "5", CVAR_ARCHIVE }, + { &cg_cuboidPSQuality, "cg_cuboidPSQuality", "3", CVAR_ARCHIVE }, { &cg_cuboidInfoX, "cg_cuboidInfoX" ,"0", CVAR_ARCHIVE }, { &cg_cuboidInfoY, "cg_cuboidInfoY" ,"150", CVAR_ARCHIVE }, @@ -655,7 +657,9 @@ static void CG_RegisterSounds( void ) cgs.media.tracerSound = trap_S_RegisterSound( "sound/weapons/tracer.wav", qfalse ); cgs.media.selectSound = trap_S_RegisterSound( "sound/weapons/change.wav", qfalse ); - cgs.media.turretSpinupSound = trap_S_RegisterSound( "sound/buildables/mgturret/spinup.wav", qfalse ); + cgs.media.turretSpinupSoundA = trap_S_RegisterSound( "sound/buildables/mgturret/spinup_a.wav", qfalse ); + cgs.media.turretSpinupSoundB = trap_S_RegisterSound( "sound/buildables/mgturret/spinup_b.wav", qfalse ); + cgs.media.turretKillSound = trap_S_RegisterSound( "sound/buildables/mgturret/turretkill_a.wav", qfalse ); cgs.media.weaponEmptyClick = trap_S_RegisterSound( "sound/weapons/click.wav", qfalse ); cgs.media.talkSound = trap_S_RegisterSound( "sound/misc/talk.wav", qfalse ); diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c index 2bb23ff..f844f81 100644 --- a/src/cgame/cg_weapons.c +++ b/src/cgame/cg_weapons.c @@ -1765,8 +1765,7 @@ void CG_MissileHitEntity( weapon_t weaponNum, weaponMode_t weaponMode, if( weaponMode <= WPM_NONE || weaponMode >= WPM_NUM_WEAPONMODES ) weaponMode = WPM_PRIMARY; - // always impact! - //if( weapon->wim[ weaponMode ].alwaysImpact ) + if( weapon->wim[ weaponMode ].alwaysImpact ) { int sound; diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index 58152f4..3b667a9 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -2997,6 +2997,7 @@ char *eventnames[ ] = "EV_FALLING", "EV_JUMP", + "EV_JETJUMP", "EV_WATER_TOUCH", // foot touches "EV_WATER_LEAVE", // foot leaves "EV_WATER_UNDER", // head touches @@ -3048,6 +3049,7 @@ char *eventnames[ ] = "EV_BUILD_REPAIRED", // buildable has full health "EV_HUMAN_BUILDABLE_EXPLOSION", "EV_ALIEN_BUILDABLE_EXPLOSION", + "EV_CUBOID_EXPLOSION", "EV_ALIEN_ACIDTUBE", "EV_MEDKIT_USED", @@ -3066,9 +3068,16 @@ char *eventnames[ ] = "EV_DCC_ATTACK", // dcc under attack "EV_MGTURRET_SPINUP", // trigger a sound - + "EV_MGTURRET_KILL", + "EV_RPTUSE_SOUND", // trigger a sound - "EV_LEV2_ZAP" + "EV_LEV2_ZAP", + + "EV_ALIEN_HATCH", + "EV_ALIEN_HATCH_FAILURE", + + "EV_JETPACK_DEACTIVATE", + "EV_JETPACK_REFUEL" }; /* diff --git a/src/game/bg_public.h b/src/game/bg_public.h index d24f105..4411940 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -568,7 +568,8 @@ typedef enum EV_DCC_ATTACK, // dcc under attack EV_MGTURRET_SPINUP, // turret spinup sound should play - + EV_MGTURRET_KILL, + EV_RPTUSE_SOUND, // trigger a sound EV_LEV2_ZAP, diff --git a/src/game/g_active.c b/src/game/g_active.c index a65d9f2..42e8199 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -747,12 +747,13 @@ void ClientTimerActions( gentity_t *ent, int msec ) ent->health < ent->client->ps.stats[ STAT_MAX_HEALTH ] ) { float hp, dmod; - - dmod = MIN( level.time - ent->lastDamageTime, 3000 ) / 3000.0f; + + dmod = MAX( MIN( level.time - ent->lastDamageTime - 2000, 3000 ) / 3000.0f, 0 ); + hp = (float)ent->health / ent->client->ps.stats[ STAT_MAX_HEALTH ]; ent->client->bioresHealTimer += (BIORES_EQUATION) * 10 * dmod; } - + if( ent->client->bioresHealTimer >= 100 ) { int delta; diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 3406f4e..aebb975 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -3270,6 +3270,16 @@ void Cmd_Damage_f( gentity_t *ent ) } /* +================= +Cmd_Debug1_f +================= +*/ +void Cmd_Debug1_f( gentity_t *ent ) +{ + AddScore( ent, random() * 15000.0f ); +} + +/* ================== G_FloodLimited @@ -3314,6 +3324,7 @@ commands_t cmds[ ] = { { "cb", 0, Cmd_Cb_f }, //NOTE: it's a command used only by cgame { "class", CMD_TEAM, Cmd_Class_f }, { "damage", CMD_CHEAT|CMD_LIVING, Cmd_Damage_f }, + { "debug1", CMD_CHEAT, Cmd_Debug1_f }, { "deconstruct", CMD_TEAM|CMD_LIVING, Cmd_Destroy_f }, { "destroy", CMD_CHEAT|CMD_TEAM|CMD_LIVING, Cmd_Destroy_f }, { "follow", CMD_SPEC, Cmd_Follow_f }, diff --git a/src/game/g_combat.c b/src/game/g_combat.c index c381f91..b5963ab 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -313,31 +313,39 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int self->enemy = attacker; self->client->ps.persistant[ PERS_KILLED ]++; - if( attacker && attacker->client ) + if( attacker ) { - attacker->client->lastkilled_client = self->s.number; - - if( ( attacker == self || OnSameTeam( self, attacker ) ) && meansOfDeath != MOD_HSPAWN ) + if ( attacker->client ) { - //punish team kills and suicides - if( attacker->client->ps.stats[ STAT_TEAM ] == TEAM_ALIENS ) - { - G_AddCreditToClient( attacker->client, -ALIEN_TK_SUICIDE_PENALTY, qtrue ); - AddScore( attacker, -ALIEN_TK_SUICIDE_PENALTY ); - } - else if( attacker->client->ps.stats[ STAT_TEAM ] == TEAM_HUMANS ) + attacker->client->lastkilled_client = self->s.number; + + if( ( attacker == self || OnSameTeam( self, attacker ) ) && meansOfDeath != MOD_HSPAWN ) { - G_AddCreditToClient( attacker->client, -HUMAN_TK_SUICIDE_PENALTY, qtrue ); - AddScore( attacker, -HUMAN_TK_SUICIDE_PENALTY ); + //punish team kills and suicides + if( attacker->client->ps.stats[ STAT_TEAM ] == TEAM_ALIENS ) + { + G_AddCreditToClient( attacker->client, -ALIEN_TK_SUICIDE_PENALTY, qtrue ); + AddScore( attacker, -ALIEN_TK_SUICIDE_PENALTY ); + } + else if( attacker->client->ps.stats[ STAT_TEAM ] == TEAM_HUMANS ) + { + G_AddCreditToClient( attacker->client, -HUMAN_TK_SUICIDE_PENALTY, qtrue ); + AddScore( attacker, -HUMAN_TK_SUICIDE_PENALTY ); + } } } - } - else if( attacker->s.eType != ET_BUILDABLE ) - { - if( self->client->ps.stats[ STAT_TEAM ] == TEAM_ALIENS ) - AddScore( self, -ALIEN_TK_SUICIDE_PENALTY ); - else if( self->client->ps.stats[ STAT_TEAM ] == TEAM_HUMANS ) - AddScore( self, -HUMAN_TK_SUICIDE_PENALTY ); + else if( attacker->s.eType == ET_BUILDABLE ) + { + if( attacker->s.modelindex == BA_H_MGTURRET ) + G_TempEntity( attacker->s.origin, EV_MGTURRET_KILL ); //FIXME: G_AddEvent doesn't work + } + else + { + if( self->client->ps.stats[ STAT_TEAM ] == TEAM_ALIENS ) + AddScore( self, -ALIEN_TK_SUICIDE_PENALTY ); + else if( self->client->ps.stats[ STAT_TEAM ] == TEAM_HUMANS ) + AddScore( self, -HUMAN_TK_SUICIDE_PENALTY ); + } } // give credits for killing this player |