X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcheats.qc;h=82bc9036158a3f343cf41c35108c2028d6c5c25a;hb=5c99ce6fe3050cddf897e9988ff59dd0a7c1ba0a;hp=657ec4d7fd3c0e15f6477c5a56c766b5a5effcb1;hpb=530e06120a7b41f6175b1144fedf6903da8c13b0;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/cheats.qc b/qcsrc/server/cheats.qc index 657ec4d7f..82bc90361 100644 --- a/qcsrc/server/cheats.qc +++ b/qcsrc/server/cheats.qc @@ -1,26 +1,31 @@ #include "cheats.qh" +#include "_all.qh" + #include "g_damage.qh" #include "race.qh" -#include "t_teleporters.qh" - -#if defined(CSQC) -#elif defined(MENUQC) -#elif defined(SVQC) - #include "../dpdefs/progsdefs.qh" - #include "../dpdefs/dpextensions.qh" - #include "../warpzonelib/anglestransform.qh" - #include "../warpzonelib/util_server.qh" - #include "../common/constants.qh" - #include "../common/util.qh" - #include "../common/monsters/monsters.qh" - #include "../common/weapons/weapons.qh" - #include "weapons/tracing.qh" - #include "autocvars.qh" - #include "defs.qh" - #include "../common/deathtypes.qh" - #include "mutators/mutators_include.qh" - #include "../csqcmodellib/sv_model.qh" -#endif +#include "../common/triggers/teleporters.qh" + +#include "mutators/mutators_include.qh" + +#include "weapons/tracing.qh" + +#include "../common/constants.qh" +#include "../common/deathtypes.qh" +#include "../common/effects.qh" +#include "../common/util.qh" + +#include "../common/monsters/all.qh" + +#include "../common/weapons/all.qh" + +#include "../common/triggers/subs.qh" + +#include "../common/triggers/func/breakable.qh" + +#include "../csqcmodellib/sv_model.qh" + +#include "../warpzonelib/anglestransform.qh" +#include "../warpzonelib/util_server.qh" void CopyBody(float keepvelocity); @@ -40,15 +45,7 @@ void Drag_MoveDrag(entity from, entity to) { } .float maycheat; float gamestart_sv_cheats; -const float CHIMPULSE_SPEEDRUN_INIT = 30; -const float CHIMPULSE_GIVE_ALL = 99; -const float CHIMPULSE_CLONE_MOVING = 140; -const float CHIMPULSE_SPEEDRUN = 141; -const float CHIMPULSE_CLONE_STANDING = 142; -const float CHIMPULSE_TELEPORT = 143; -const float CHIMPULSE_R00T = 148; -const float CHRAME_DRAG = 8; void CheatInit() { @@ -216,7 +213,7 @@ float CheatImpulse(float i) self.angles = self.personal.v_angle; self.fixangle = true; - MUTATOR_CALLHOOK(AbortSpeedrun); + MUTATOR_CALLHOOK(AbortSpeedrun, self); } self.ammo_rockets = self.personal.ammo_rockets; @@ -285,15 +282,15 @@ float CheatImpulse(float i) else e = self; - pointparticles(particleeffectnum("rocket_explode"), e.origin, '0 0 0', 1); - sound(e, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM); + Send_Effect(EFFECT_ROCKET_EXPLODE, e.origin, '0 0 0', 1); + sound(e, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM); e2 = spawn(); setorigin(e2, e.origin); RadiusDamage(e2, self, 1000, 0, 128, world, world, 500, DEATH_CHEAT, e); remove(e2); - print("404 Sportsmanship not found.\n"); + LOG_INFO("404 Sportsmanship not found.\n"); DID_CHEAT(); break; } @@ -324,13 +321,12 @@ float CheatCommand(float argc) // origin (0..1, on crosshair line) // velocity // howmany - effectnum = particleeffectnum(argv(1)); f = stof(argv(2)); crosshair_trace(self); start = (1-f) * self.origin + f * trace_endpos; end = stov(argv(3)); f = stof(argv(4)); - pointparticles(effectnum, start, end, f); + Send_Effect_(argv(1), start, end, f); DID_CHEAT(); break; } @@ -342,7 +338,7 @@ float CheatCommand(float argc) { // arguments: // effectname - effectnum = particleeffectnum(argv(1)); + effectnum = _particleeffectnum(argv(1)); W_SetupShot(self, false, false, "", CH_WEAPON_A, 0); traceline(w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, MOVE_NORMAL, self); trailparticles(self, effectnum, w_shotorg, trace_endpos); @@ -1037,7 +1033,13 @@ void Drag_Update(entity dragger) draggee.ltime = max(servertime + serverframetime, draggee.ltime); // fixes func_train breakage - te_lightning1(dragger, dragger.origin + dragger.view_ofs, curorigin); + vector vecs = '0 0 0'; + if(dragger.weaponentity.movedir_x > 0) + vecs = dragger.weaponentity.movedir; + + vector dv = v_right * -vecs_y + v_up * vecs_z; + + te_lightning1(draggee, dragger.origin + dragger.view_ofs + dv, curorigin); } float Drag_CanDrag(entity dragger)