This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch master
in repository openjk.

commit 7a5c138e64c36836a0c13ebd9fd5aa7211bc052a
Author: Simon McVittie <[email protected]>
Date:   Sun Jan 4 18:43:00 2015 +0000

    Imported Upstream version 0~20150104+ds1
---
 code/cgame/cg_ents.cpp       | 15 +++++---
 code/cgame/cg_weapons.cpp    |  2 +-
 code/game/bg_vehicleLoad.cpp | 88 +++++++++++++++++++++++++++++---------------
 3 files changed, 69 insertions(+), 36 deletions(-)

diff --git a/code/cgame/cg_ents.cpp b/code/cgame/cg_ents.cpp
index c473b8e..6deef67 100644
--- a/code/cgame/cg_ents.cpp
+++ b/code/cgame/cg_ents.cpp
@@ -1117,7 +1117,7 @@ static void CG_Missile( centity_t *cent ) {
                VectorCopy( s1->angles, cent->lerpAngles );
        }
 
-       if ( s1->otherEntityNum2 && 
(g_vehWeaponInfo[s1->otherEntityNum2].iShotFX != NULL_FX || 
g_vehWeaponInfo[s1->otherEntityNum2].iModel != NULL_HANDLE) )
+       if ( s1->otherEntityNum2 && 
(g_vehWeaponInfo[s1->otherEntityNum2].iShotFX || 
g_vehWeaponInfo[s1->otherEntityNum2].iModel) )
        {
                vec3_t forward;
                
@@ -1151,15 +1151,18 @@ static void CG_Missile( centity_t *cent ) {
                        VectorScale( forward, scale, forward );
                }
                
-               
theFxScheduler.PlayEffect(g_vehWeaponInfo[s1->otherEntityNum2].iShotFX, 
cent->lerpOrigin, forward);
+               CG_PlayEffectID(g_vehWeaponInfo[s1->otherEntityNum2].iShotFX, 
cent->lerpOrigin, forward);
                if ( g_vehWeaponInfo[s1->otherEntityNum2].iLoopSound )
                {
                        vec3_t  velocity;
                        EvaluateTrajectoryDelta( &cent->currentState.pos, 
cg.time, velocity );
-                       cgi_S_AddLoopingSound( cent->currentState.number, 
cent->lerpOrigin, velocity, g_vehWeaponInfo[s1->otherEntityNum2].iLoopSound );
+                       if 
(cgs.sound_precache[g_vehWeaponInfo[s1->otherEntityNum2].iLoopSound] != 
NULL_SFX)
+                       {
+                               cgi_S_AddLoopingSound( 
cent->currentState.number, cent->lerpOrigin, velocity, 
cgs.sound_precache[g_vehWeaponInfo[s1->otherEntityNum2].iLoopSound] );
+                       }
                }
                //add custom model
-               if ( g_vehWeaponInfo[s1->otherEntityNum2].iModel == NULL_HANDLE 
)
+               if ( !g_vehWeaponInfo[s1->otherEntityNum2].iModel )
                {
                        return;
                }
@@ -1220,8 +1223,8 @@ Ghoul2 Insert End
        ent.skinNum = cg.clientFrame & 1;
        ent.renderfx = /*weapon->missileRenderfx | */RF_NOSHADOW;
 
-       if ( s1->otherEntityNum2 && 
(g_vehWeaponInfo[s1->otherEntityNum2].iModel != NULL_HANDLE))
-               ent.hModel = g_vehWeaponInfo[s1->otherEntityNum2].iModel;
+       if ( s1->otherEntityNum2 && g_vehWeaponInfo[s1->otherEntityNum2].iModel 
&& cgs.model_draw[g_vehWeaponInfo[s1->otherEntityNum2].iModel] != NULL_HANDLE)
+               ent.hModel = 
cgs.model_draw[g_vehWeaponInfo[s1->otherEntityNum2].iModel];
        else if ( cent->gent->alt_fire )
                ent.hModel = weapon->alt_missileModel;
        else
diff --git a/code/cgame/cg_weapons.cpp b/code/cgame/cg_weapons.cpp
index 3e20acd..84d865e 100644
--- a/code/cgame/cg_weapons.cpp
+++ b/code/cgame/cg_weapons.cpp
@@ -2895,7 +2895,7 @@ qboolean CG_VehicleWeaponImpact( centity_t *cent )
        if (cent->currentState.otherEntityNum2
                && 
g_vehWeaponInfo[cent->currentState.otherEntityNum2].iImpactFX)
        {//missile is from a special vehWeapon
-               
theFxScheduler.PlayEffect(g_vehWeaponInfo[cent->currentState.otherEntityNum2].iImpactFX,
 cent->lerpOrigin, cent->gent->pos1);
+               
CG_PlayEffectID(g_vehWeaponInfo[cent->currentState.otherEntityNum2].iImpactFX, 
cent->lerpOrigin, cent->gent->pos1);
                return qtrue;
        }
        return qfalse;
diff --git a/code/game/bg_vehicleLoad.cpp b/code/game/bg_vehicleLoad.cpp
index 33bfe88..a5342df 100644
--- a/code/game/bg_vehicleLoad.cpp
+++ b/code/game/bg_vehicleLoad.cpp
@@ -82,12 +82,6 @@ extern sfxHandle_t   trap_S_RegisterSound( const char 
*sample);              // returns buzz i
 #include "../namespace_end.h"
 #endif
 
-extern sfxHandle_t     cgi_S_RegisterSound( const char *sample );
-extern qhandle_t       cgi_R_RegisterModel( const char *name );
-#if !defined(FX_SCHEDULER_H_INC)
-       #include "../cgame/FxScheduler.h"
-#endif
-
 extern stringID_table_t animTable [MAX_ANIMATIONS+1];
 
 // These buffers are filled in with the same contents and then just read from 
in
@@ -165,7 +159,7 @@ vehField_t vehWeaponFields[] =
        {"hasGravity", VWFOFS(bHasGravity), VF_BOOL},   //if a projectile, drops
        {"ionWeapon", VWFOFS(bIonWeapon), VF_BOOL},     //disables ship shields 
and sends them out of control
        {"saberBlockable", VWFOFS(bSaberBlockable), VF_BOOL},   //lightsabers 
can deflect this projectile
-       {"muzzleFX", VWFOFS(iMuzzleFX), VF_EFFECT},     //index of Muzzle Effect
+       {"muzzleFX", VWFOFS(iMuzzleFX), VF_EFFECT_CLIENT},      //index of 
Muzzle Effect
        {"model", VWFOFS(iModel), VF_MODEL_CLIENT},     //handle to the model 
used by this projectile
        {"shotFX", VWFOFS(iShotFX), VF_EFFECT_CLIENT},  //index of Shot Effect
        {"impactFX", VWFOFS(iImpactFX), VF_EFFECT_CLIENT},      //index of 
Impact Effect
@@ -273,8 +267,14 @@ static qboolean BG_ParseVehWeaponParm( vehWeaponInfo_t 
*vehWeapon, const char *p
                *(int *)(b+vehWeaponField->ofs) = trap_R_RegisterModel( value );
 #endif
                break;
-       case VF_MODEL_CLIENT:   // take the string, get the index
-               *(int *)(b+vehWeaponField->ofs) = cgi_R_RegisterModel( value );
+       case VF_MODEL_CLIENT:   // (MP cgame only) take the string, get the 
G_ModelIndex
+#ifndef _JK2MP
+               *(int *)(b+vehWeaponField->ofs) = G_ModelIndex( value );
+#elif defined QAGAME
+               //*(int *)(b+vehWeaponField->ofs) = G_ModelIndex( value );
+#else
+               *(int *)(b+vehWeaponField->ofs) = trap_R_RegisterModel( value );
+#endif
                break;
        case VF_EFFECT: // take the string, get the G_EffectIndex
 #ifdef QAGAME
@@ -283,8 +283,14 @@ static qboolean BG_ParseVehWeaponParm( vehWeaponInfo_t 
*vehWeapon, const char *p
                *(int *)(b+vehWeaponField->ofs) = trap_FX_RegisterEffect( value 
);
 #endif
                break;
-       case VF_EFFECT_CLIENT:  // take the string, get the index
-               *(int *)(b+vehWeaponField->ofs) = 
theFxScheduler.RegisterEffect( value );
+       case VF_EFFECT_CLIENT:  // (MP cgame only) take the string, get the 
index
+#ifndef _JK2MP
+               *(int *)(b+vehWeaponField->ofs) = G_EffectIndex( value );
+#elif defined QAGAME
+               //*(int *)(b+vehWeaponField->ofs) = G_EffectIndex( value );
+#elif defined CGAME
+               *(int *)(b+vehWeaponField->ofs) = trap_FX_RegisterEffect( value 
);
+#endif
                break;
        case VF_SHADER: // (cgame only) take the string, call 
trap_R_RegisterShader
 #ifdef WE_ARE_IN_THE_UI
@@ -305,8 +311,14 @@ static qboolean BG_ParseVehWeaponParm( vehWeaponInfo_t 
*vehWeapon, const char *p
                *(int *)(b+vehWeaponField->ofs) = trap_S_RegisterSound( value );
 #endif
                break;
-       case VF_SOUND_CLIENT:   // take the string, get the index
-               *(int *)(b+vehWeaponField->ofs) = cgi_S_RegisterSound( value );
+       case VF_SOUND_CLIENT:   // (MP cgame only) take the string, get the 
index
+#ifndef _JK2MP
+               *(int *)(b+vehWeaponField->ofs) = G_SoundIndex( value );
+#elif defined QAGAME
+               //*(int *)(b+vehWeaponField->ofs) = G_SoundIndex( value );
+#else
+               *(int *)(b+vehWeaponField->ofs) = trap_S_RegisterSound( value );
+#endif
                break;
        default:
                //Unknown type?
@@ -543,29 +555,29 @@ vehField_t vehicleFields[] =
        {"soundTurbo",          VFOFS(soundTurbo),              
VF_SOUND},//sound to play when turbo/afterburner kicks in
        {"soundHyper",          VFOFS(soundHyper),              
VF_SOUND_CLIENT},//sound to play when hits hyperspace
        {"soundLand",           VFOFS(soundLand),               
VF_SOUND},//sound to play when ship lands
-       {"soundFlyBy",          VFOFS(soundFlyBy),              
VF_SOUND},//sound to play when they buzz you
-       {"soundFlyBy2",         VFOFS(soundFlyBy2),             
VF_SOUND},//alternate sound to play when they buzz you
+       {"soundFlyBy",          VFOFS(soundFlyBy),              
VF_SOUND_CLIENT},//sound to play when they buzz you
+       {"soundFlyBy2",         VFOFS(soundFlyBy2),             
VF_SOUND_CLIENT},//alternate sound to play when they buzz you
        {"soundShift1",         VFOFS(soundShift1),             
VF_SOUND},//sound to play when changing speeds
        {"soundShift2",         VFOFS(soundShift2),             
VF_SOUND},//sound to play when changing speeds
        {"soundShift3",         VFOFS(soundShift3),             
VF_SOUND},//sound to play when changing speeds
        {"soundShift4",         VFOFS(soundShift4),             
VF_SOUND},//sound to play when changing speeds
 
-       {"exhaustFX", VFOFS(iExhaustFX), VF_EFFECT},            //exhaust 
effect, played from "*exhaust" bolt(s)
-       {"turboFX", VFOFS(iTurboFX), VF_EFFECT},                //turbo exhaust 
effect, played from "*exhaust" bolt(s) when ship is in "turbo" mode
+       {"exhaustFX", VFOFS(iExhaustFX), VF_EFFECT_CLIENT},             
//exhaust effect, played from "*exhaust" bolt(s)
+       {"turboFX", VFOFS(iTurboFX), VF_EFFECT_CLIENT},         //turbo exhaust 
effect, played from "*exhaust" bolt(s) when ship is in "turbo" mode
        {"turboStartFX", VFOFS(iTurboStartFX), VF_EFFECT},              //turbo 
start effect, played from "*exhaust" bolt(s) when ship is in "turbo" mode
-       {"trailFX", VFOFS(iTrailFX), VF_EFFECT},                //trail effect, 
played from "*trail" bolt(s)
-       {"impactFX", VFOFS(iImpactFX), VF_EFFECT},              //impact 
effect, for when it bumps into something
+       {"trailFX", VFOFS(iTrailFX), VF_EFFECT_CLIENT},         //trail effect, 
played from "*trail" bolt(s)
+       {"impactFX", VFOFS(iImpactFX), VF_EFFECT_CLIENT},               
//impact effect, for when it bumps into something
        {"explodeFX", VFOFS(iExplodeFX), VF_EFFECT},            //explosion 
effect, for when it blows up (should have the sound built into explosion effect)
-       {"wakeFX", VFOFS(iWakeFX), VF_EFFECT},          //effect it makes when 
going across water
-       {"dmgFX", VFOFS(iDmgFX), VF_EFFECT},            //effect to play on 
damage from a weapon or something
+       {"wakeFX", VFOFS(iWakeFX), VF_EFFECT_CLIENT},           //effect it 
makes when going across water
+       {"dmgFX", VFOFS(iDmgFX), VF_EFFECT_CLIENT},             //effect to 
play on damage from a weapon or something
 #ifdef _JK2MP
        {"injureFX", VFOFS(iInjureFX), VF_EFFECT_CLIENT}, //effect to play on 
partially damaged ship surface
        {"noseFX", VFOFS(iNoseFX), VF_EFFECT_CLIENT},           //effect for 
nose piece flying away when blown off
        {"lwingFX", VFOFS(iLWingFX), VF_EFFECT_CLIENT},         //effect for 
left wing piece flying away when blown off
        {"rwingFX", VFOFS(iRWingFX), VF_EFFECT_CLIENT},         //effect for 
right wing piece flying away when blown off
 #else
-       {"armorLowFX", VFOFS(iArmorLowFX), VF_EFFECT},          //effect to 
play on damage from a weapon or something
-       {"armorGoneFX", VFOFS(iArmorGoneFX), VF_EFFECT},                
//effect to play on damage from a weapon or something
+       {"armorLowFX", VFOFS(iArmorLowFX), VF_EFFECT_CLIENT},           
//effect to play on damage from a weapon or something
+       {"armorGoneFX", VFOFS(iArmorGoneFX), VF_EFFECT_CLIENT},         
//effect to play on damage from a weapon or something
 #endif
 
        // Weapon stuff:
@@ -940,8 +952,14 @@ static qboolean BG_ParseVehicleParm( vehicleInfo_t 
*vehicle, const char *parmNam
                *(int *)(b+vehField->ofs) = trap_R_RegisterModel( value );
 #endif
                break;
-       case VF_MODEL_CLIENT:   // take the string, get the index
-               *(int *)(b+vehField->ofs) = cgi_R_RegisterModel( value );
+       case VF_MODEL_CLIENT:   // (MP cgame only) take the string, get the 
G_ModelIndex
+#ifndef _JK2MP
+               *(int *)(b+vehField->ofs) = G_ModelIndex( value );
+#elif defined QAGAME
+               //*(int *)(b+vehField->ofs) = G_ModelIndex( value );
+#else
+               *(int *)(b+vehField->ofs) = trap_R_RegisterModel( value );
+#endif
                break;
        case VF_EFFECT: // take the string, get the G_EffectIndex
 #ifdef QAGAME
@@ -950,8 +968,14 @@ static qboolean BG_ParseVehicleParm( vehicleInfo_t 
*vehicle, const char *parmNam
                *(int *)(b+vehField->ofs) = trap_FX_RegisterEffect( value );
 #endif
                break;
-       case VF_EFFECT_CLIENT:  // take the string, get the effect index
-               *(int *)(b+vehField->ofs) = theFxScheduler.RegisterEffect( 
value );
+       case VF_EFFECT_CLIENT:  // (MP cgame only) take the string, get the 
G_EffectIndex
+#ifndef _JK2MP
+               *(int *)(b+vehField->ofs) = G_EffectIndex( value );
+#elif defined QAGAME
+               //*(int *)(b+vehField->ofs) = G_EffectIndex( value );
+#elif defined CGAME
+               *(int *)(b+vehField->ofs) = trap_FX_RegisterEffect( value );
+#endif
                break;
        case VF_SHADER: // (cgame only) take the string, call 
trap_R_RegisterShader
 #ifdef WE_ARE_IN_THE_UI
@@ -972,8 +996,14 @@ static qboolean BG_ParseVehicleParm( vehicleInfo_t 
*vehicle, const char *parmNam
                *(int *)(b+vehField->ofs) = trap_S_RegisterSound( value );
 #endif
                break;
-       case VF_SOUND_CLIENT:   // (MP cgame only) take the string, get the 
index
-               *(int *)(b+vehField->ofs) = cgi_S_RegisterSound( value );
+       case VF_SOUND_CLIENT:   // (MP cgame only) take the string, get the 
G_SoundIndex
+#ifndef _JK2MP
+               *(int *)(b+vehField->ofs) = G_SoundIndex( value );
+#elif defined QAGAME
+               //*(int *)(b+vehField->ofs) = G_SoundIndex( value );
+#else
+               *(int *)(b+vehField->ofs) = trap_S_RegisterSound( value );
+#endif
                break;
        default:
                //Unknown type?

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/openjk.git

_______________________________________________
Pkg-games-commits mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to