Moved decal spawning for impacts into the client-side
This commit is contained in:
parent
a7fc08f857
commit
4de7182c10
2 changed files with 14 additions and 48 deletions
|
@ -240,12 +240,8 @@ void Decals_PlaceSmall(vector pos)
|
|||
if (serverkeyfloat("*bspversion") != 30) {
|
||||
return;
|
||||
}
|
||||
#ifdef CSQC
|
||||
// TODO
|
||||
#else
|
||||
decal x = Decals_Next(pos);
|
||||
x.Place(pos, sprintf("{shot%d", floor(random(1,6))));
|
||||
#endif
|
||||
}
|
||||
|
||||
void Decals_PlaceBig(vector pos)
|
||||
|
@ -253,12 +249,8 @@ void Decals_PlaceBig(vector pos)
|
|||
if (serverkeyfloat("*bspversion") != 30) {
|
||||
return;
|
||||
}
|
||||
#ifdef CSQC
|
||||
// TODO
|
||||
#else
|
||||
decal x = Decals_Next(pos);
|
||||
x.Place(pos, sprintf("{bigshot%d", floor(random(1,6))));
|
||||
#endif
|
||||
}
|
||||
|
||||
void Decals_PlaceGlass(vector pos)
|
||||
|
@ -266,12 +258,8 @@ void Decals_PlaceGlass(vector pos)
|
|||
if (serverkeyfloat("*bspversion") != 30) {
|
||||
return;
|
||||
}
|
||||
#ifdef CSQC
|
||||
// TODO
|
||||
#else
|
||||
decal x = Decals_Next(pos);
|
||||
x.Place(pos, sprintf("{break%d", floor(random(1,4))));
|
||||
#endif
|
||||
}
|
||||
|
||||
void Decals_PlaceScorch(vector pos)
|
||||
|
@ -279,12 +267,8 @@ void Decals_PlaceScorch(vector pos)
|
|||
if (serverkeyfloat("*bspversion") != 30) {
|
||||
return;
|
||||
}
|
||||
#ifdef CSQC
|
||||
// TODO
|
||||
#else
|
||||
decal x = Decals_Next(pos);
|
||||
x.Place(pos, sprintf("{scorch%d", floor(random(1,4))));
|
||||
#endif
|
||||
}
|
||||
|
||||
void Decals_PlaceDent(vector pos)
|
||||
|
@ -292,12 +276,8 @@ void Decals_PlaceDent(vector pos)
|
|||
if (serverkeyfloat("*bspversion") != 30) {
|
||||
return;
|
||||
}
|
||||
#ifdef CSQC
|
||||
// TODO
|
||||
#else
|
||||
decal x = Decals_Next(pos);
|
||||
x.Place(pos, sprintf("{dent%d", floor(random(1,7))));
|
||||
#endif
|
||||
}
|
||||
|
||||
void Decals_PlaceGauss(vector pos)
|
||||
|
@ -305,10 +285,7 @@ void Decals_PlaceGauss(vector pos)
|
|||
if (serverkeyfloat("*bspversion") != 30) {
|
||||
return;
|
||||
}
|
||||
#ifdef CSQC
|
||||
// TODO
|
||||
#else
|
||||
|
||||
decal x = Decals_Next(pos);
|
||||
x.Place(pos, "{gaussshot1");
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -292,57 +292,46 @@ void Effect_Impact(int iType, vector vPos, vector vNormal) {
|
|||
WriteCoord(MSG_MULTICAST, vNormal[2]);
|
||||
msg_entity = self;
|
||||
multicast(vPos, MULTICAST_PVS);
|
||||
#else
|
||||
/* decals */
|
||||
switch (iType) {
|
||||
case IMPACT_GLASS:
|
||||
Decals_PlaceGlass(vPos);
|
||||
break;
|
||||
case IMPACT_MELEE:
|
||||
Decals_PlaceSmall(vPos);
|
||||
break;
|
||||
default:
|
||||
Decals_PlaceBig(vPos);
|
||||
break;
|
||||
}
|
||||
|
||||
switch (iType) {
|
||||
case IMPACT_GLASS:
|
||||
Decals_PlaceGlass(vPos);
|
||||
break;
|
||||
case IMPACT_MELEE:
|
||||
Decals_PlaceSmall(vPos);
|
||||
break;
|
||||
default:
|
||||
Decals_PlaceBig(vPos);
|
||||
break;
|
||||
}
|
||||
#else
|
||||
switch (iType) {
|
||||
case IMPACT_MELEE:
|
||||
/*pointparticles(DECAL_SHOT, vPos, vNormal, 1);
|
||||
pointparticles(PARTICLE_PIECES_BLACK, vPos, vNormal, 1);*/
|
||||
pointsound(vPos, "weapons/knife_hitwall1.wav", 1, ATTN_STATIC);
|
||||
//Decals_PlaceSmall(vPos);
|
||||
break;
|
||||
case IMPACT_EXPLOSION:
|
||||
break;
|
||||
case IMPACT_GLASS:
|
||||
//pointparticles(DECAL_GLASS, vPos, vNormal, 1);
|
||||
pointparticles(PARTICLE_PIECES_BLACK, vPos, vNormal, 1);
|
||||
//Decals_PlaceBig(vPos);
|
||||
break;
|
||||
case IMPACT_WOOD:
|
||||
//pointparticles(DECAL_SHOT, vPos, vNormal, 1);
|
||||
pointparticles(PARTICLE_SPARK, vPos, vNormal, 1);
|
||||
pointparticles(PARTICLE_PIECES_BLACK, vPos, vNormal, 1);
|
||||
pointparticles(PARTICLE_SMOKE_BROWN, vPos, vNormal, 1);
|
||||
//Decals_PlaceBig(vPos);
|
||||
break;
|
||||
case IMPACT_METAL:
|
||||
//pointparticles(DECAL_SHOT, vPos, vNormal, 1);
|
||||
pointparticles(PARTICLE_SPARK, vPos, vNormal, 1);
|
||||
pointparticles(PARTICLE_SPARK, vPos, vNormal, 1);
|
||||
pointparticles(PARTICLE_PIECES_BLACK, vPos, vNormal, 1);
|
||||
//Decals_PlaceBig(vPos);
|
||||
break;
|
||||
case IMPACT_FLESH:
|
||||
pointparticles(PARTICLE_BLOOD, vPos, vNormal, 1);
|
||||
//Decals_PlaceBig(vPos);
|
||||
break;
|
||||
case IMPACT_DEFAULT:
|
||||
//pointparticles(DECAL_SHOT, vPos, vNormal, 1);
|
||||
pointparticles(PARTICLE_SPARK, vPos, vNormal, 1);
|
||||
pointparticles(PARTICLE_PIECES_BLACK, vPos, vNormal, 1);
|
||||
pointparticles(PARTICLE_SMOKE_GREY, vPos, vNormal, 1);
|
||||
//Decals_PlaceBig(vPos);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue