Added the 'getpos' command that people in Source are familar with.

Requested by Xylemon!
This commit is contained in:
Marco Cawthorne 2020-04-23 04:56:23 +02:00
parent f79863d3c1
commit 4794f45cb1
2 changed files with 4 additions and 2 deletions

View file

@ -20,6 +20,7 @@ CSQC_Init(float apilevel, string enginename, float engineversion)
Sound_Init();
pSeat = &g_seats[0];
registercommand("getpos");
registercommand("callvote");
registercommand("dev_sentence");
registercommand("titles_test");
@ -538,6 +539,9 @@ CSQC_ConsoleCommand(string sCMD)
sendevent("VoteN", "");
}
break;
case "getpos":
print(sprintf("setpos %v;setang -%v\n", getproperty(VF_ORIGIN), getproperty(VF_ANGLES)));
break;
case "callvote":
sendevent("CallVote", "s", substring(sCMD, 9, strlen(sCMD)-9));
break;

View file

@ -76,8 +76,6 @@ Fade_Update (int x, int y, int w, int h)
return;
}
print(sprintf("FADE: %f\n", pSeat->m_flFadeAlpha));
if (pSeat->m_flFadeStyle & EVF_MODULATE) {
drawpic([x, y], "fade_modulate", [w, h], pSeat->m_vecFadeColor, pSeat->m_flFadeAlpha * pSeat->m_flFadeMaxAlpha, 0);
} else {