X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fintermission.qc;h=3bb3bdb8e01b65aa552405537573bfd713ccc97a;hb=9e5d0f235bd9d5f14f87066d872fa7de79dcf4bb;hp=fe2e0dea03a385508f9f96e7f2536e7d6fb280a9;hpb=67610c5b92e218cc245c040209c1a79ab6b02758;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/intermission.qc b/qcsrc/server/intermission.qc index fe2e0dea0..3bb3bdb8e 100644 --- a/qcsrc/server/intermission.qc +++ b/qcsrc/server/intermission.qc @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -423,14 +424,21 @@ void IntermissionThink(entity this) { FixIntermissionClient(this); - float server_screenshot = (autocvar_sv_autoscreenshot && CS(this).cvar_cl_autoscreenshot); - float client_screenshot = (CS(this).cvar_cl_autoscreenshot == 2); + float server_screenshot = (autocvar_sv_autoscreenshot && CS_CVAR(this).cvar_cl_autoscreenshot); + float client_screenshot = (CS_CVAR(this).cvar_cl_autoscreenshot == 2); if( (server_screenshot || client_screenshot) && ((this.autoscreenshot > 0) && (time > this.autoscreenshot)) ) { this.autoscreenshot = -1; - if(IS_REAL_CLIENT(this)) { stuffcmd(this, sprintf("\nscreenshot screenshots/autoscreenshot/%s-%s.jpg; echo \"^5A screenshot has been taken at request of the server.\"\n", GetMapname(), strftime(false, "%s"))); } + if(IS_REAL_CLIENT(this)) + { + string num = strftime(false, "%s"); + if (num == "") + num = strftime_s(); + stuffcmd(this, sprintf("\nscreenshot screenshots/autoscreenshot/%s-%s.jpg; " + "echo \"^5A screenshot has been taken at request of the server.\"\n", GetMapname(), num)); + } return; } @@ -449,11 +457,10 @@ void FixIntermissionClient(entity e) if(!e.autoscreenshot) // initial call { e.autoscreenshot = time + 0.8; // used for autoscreenshot - SetResourceExplicit(e, RES_HEALTH, -2342); - // first intermission phase; voting phase has positive health (used to decide whether to send SVC_FINALE or not) + SetResourceExplicit(e, RES_HEALTH, -2342); // health in the first intermission phase for (int slot = 0; slot < MAX_WEAPONSLOTS; ++slot) { - .entity weaponentity = weaponentities[slot]; + .entity weaponentity = weaponentities[slot]; if(e.(weaponentity)) { e.(weaponentity).effects = EF_NODRAW;