mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-14 17:01:22 +00:00
21 lines
384 B
R
21 lines
384 B
R
#include "cvar.h"
|
|
|
|
#include "RunToggle.h"
|
|
|
|
@implementation RunToggle
|
|
-(void)toggle
|
|
{
|
|
if (Cvar_GetFloat ("cl_forwardspeed") < 400) {
|
|
Cvar_SetFloat ("cl_forwardspeed", 400);
|
|
Cvar_SetFloat ("cl_backspeed", 400);
|
|
} else {
|
|
Cvar_SetFloat ("cl_forwardspeed", 200);
|
|
Cvar_SetFloat ("cl_backspeed", 200);
|
|
}
|
|
}
|
|
|
|
-(BOOL)value
|
|
{
|
|
return Cvar_GetFloat ("cl_forwardspeed") >= 400;
|
|
}
|
|
@end
|