From 668d07ea37bfecfda835f8b7d10940fabb4caea3 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 13 Nov 2014 19:47:36 +1100 Subject: [PATCH] Update player model list when menu is opened (no noticeable performance difference, fixes clients needing to menu_restart to load custom server's models) --- qcsrc/menu/xonotic/playermodel.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qcsrc/menu/xonotic/playermodel.c b/qcsrc/menu/xonotic/playermodel.c index e4195617f..a1592de17 100644 --- a/qcsrc/menu/xonotic/playermodel.c +++ b/qcsrc/menu/xonotic/playermodel.c @@ -5,6 +5,7 @@ CLASS(XonoticPlayerModelSelector) EXTENDS(XonoticImage) METHOD(XonoticPlayerModelSelector, saveCvars, void(entity)) METHOD(XonoticPlayerModelSelector, draw, void(entity)) METHOD(XonoticPlayerModelSelector, resizeNotify, void(entity, vector, vector, vector, vector)) + METHOD(XonoticPlayerModelSelector, showNotify, void(entity)) ATTRIB(XonoticPlayerModelSelector, currentModel, string, string_null) ATTRIB(XonoticPlayerModelSelector, currentSkin, float, 0) ATTRIB(XonoticPlayerModelSelector, currentModelImage, string, string_null) @@ -201,4 +202,9 @@ void XonoticPlayerModelSelector_resizeNotify(entity me, vector relOrigin, vector me.realFontSize_y = me.fontSize / absSize_y; me.realFontSize_x = me.fontSize / absSize_x; } + +void XonoticPlayerModelSelector_showNotify(entity me) +{ + me.configureXonoticPlayerModelSelector(me); +} #endif -- 2.39.2