X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Futil.qc;h=1930d7c6fc4a04f2c7d33d029631f79bae308c29;hb=48a9eb74e54b8e703797522a2591c65d19596915;hp=9e4bdf7e74c90fcb0df4f4fcf062bfee62d691ea;hpb=e2cdd292127becabc2bbc805d83695713c553781;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/util.qc b/qcsrc/common/util.qc index 9e4bdf7e7..1930d7c6f 100644 --- a/qcsrc/common/util.qc +++ b/qcsrc/common/util.qc @@ -2228,3 +2228,23 @@ void Skeleton_SetBones(entity e) e.skeleton_bones_index = e.modelindex; } #endif + +string to_execute_next_frame; +void execute_next_frame() +{ + if(to_execute_next_frame) + { + localcmd("\n", to_execute_next_frame, "\n"); + strunzone(to_execute_next_frame); + to_execute_next_frame = string_null; + } +} +void queue_to_execute_next_frame(string s) +{ + if(to_execute_next_frame) + { + s = strcat(s, "\n", to_execute_next_frame); + strunzone(to_execute_next_frame); + } + to_execute_next_frame = strzone(s); +}