diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2009-06-15 09:46:25 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2009-06-15 09:46:25 +0000 |
| commit | b3c1bae2e917faf6e2f4e9f3075195a03a16f8ba (patch) | |
| tree | c48d376273ccc54f65698ab797816afa9cb67d0a /src/game/client/components/motd.cpp | |
| parent | a934488e9f2c5aeb1997a4b3b9ecdad2537686d1 (diff) | |
| download | zcatch-b3c1bae2e917faf6e2f4e9f3075195a03a16f8ba.tar.gz zcatch-b3c1bae2e917faf6e2f4e9f3075195a03a16f8ba.zip | |
cleaned up localization. fixed motd so it shows when connecting to a server
Diffstat (limited to 'src/game/client/components/motd.cpp')
| -rw-r--r-- | src/game/client/components/motd.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/game/client/components/motd.cpp b/src/game/client/components/motd.cpp index 3b8f2243..0d1eacba 100644 --- a/src/game/client/components/motd.cpp +++ b/src/game/client/components/motd.cpp @@ -6,11 +6,6 @@ #include <game/client/gameclient.hpp> #include "motd.hpp" - -void MOTD::on_reset() -{ - clear(); -} void MOTD::clear() { @@ -22,6 +17,12 @@ bool MOTD::is_active() return time_get() < server_motd_time; } +void MOTD::on_statechange(int new_state, int old_state) +{ + if(old_state == CLIENTSTATE_ONLINE || old_state == CLIENTSTATE_OFFLINE) + clear(); +} + void MOTD::on_render() { if(!is_active()) |