Miscellaneous ZDoom utilities

KeyBound

bool KeyBound(str command)

Returns true if the command is bound to any key.

This function works by calling StrParam(k:command) and reading the returned string. If the returned string is “??? (command)”, no key is bound to the command.

Examples:

if (!KeyBound("mymod_menu"))
print(s:"Please bind a key to open the menu");

Can also be used with +aliases and -aliases:

if (!KeyBound("+mymod_sprint"))
print(s:"Please bind a sprint key");

SyncSpeed

int syncspeed(int newdistance, int syncdistance, int syncspd)

A function copied from ZDoom wiki: syncspeed.