|
@@ -2698,6 +2698,8 @@ void OpenRaider::processRoom(int index)
|
2698
|
2698
|
//! \fixme Use rc_get_bool consistently!
|
2699
|
2699
|
void OpenRaider::consoleCommand(char *cmd)
|
2700
|
2700
|
{
|
|
2701
|
+ bool b = false;
|
|
2702
|
+
|
2701
|
2703
|
if (!cmd || !cmd[0])
|
2702
|
2704
|
return;
|
2703
|
2705
|
|
|
@@ -2805,7 +2807,8 @@ void OpenRaider::consoleCommand(char *cmd)
|
2805
|
2807
|
}
|
2806
|
2808
|
else if (rc_command("r_animate", cmd))
|
2807
|
2809
|
{
|
2808
|
|
- if (atoi(cmd))
|
|
2810
|
+ rc_get_bool(cmd, &b);
|
|
2811
|
+ if (b)
|
2809
|
2812
|
{
|
2810
|
2813
|
m_render.setFlags(Render::fAnimateAllModels);
|
2811
|
2814
|
print(false, "Animating all models");
|
|
@@ -2818,7 +2821,8 @@ void OpenRaider::consoleCommand(char *cmd)
|
2818
|
2821
|
}
|
2819
|
2822
|
else if (rc_command("r_ponytail", cmd))
|
2820
|
2823
|
{
|
2821
|
|
- if (atoi(cmd))
|
|
2824
|
+ rc_get_bool(cmd, &b);
|
|
2825
|
+ if (b)
|
2822
|
2826
|
{
|
2823
|
2827
|
m_render.setFlags(Render::fRenderPonytail);
|
2824
|
2828
|
print(false, "Rendering ponytail");
|
|
@@ -2831,7 +2835,8 @@ void OpenRaider::consoleCommand(char *cmd)
|
2831
|
2835
|
}
|
2832
|
2836
|
else if (rc_command("r_light", cmd))
|
2833
|
2837
|
{
|
2834
|
|
- if (atoi(cmd))
|
|
2838
|
+ rc_get_bool(cmd, &b);
|
|
2839
|
+ if (b)
|
2835
|
2840
|
{
|
2836
|
2841
|
m_render.setFlags(Render::fGL_Lights);
|
2837
|
2842
|
}
|
|
@@ -2842,7 +2847,8 @@ void OpenRaider::consoleCommand(char *cmd)
|
2842
|
2847
|
}
|
2843
|
2848
|
else if (rc_command("hop", cmd))
|
2844
|
2849
|
{
|
2845
|
|
- if (atoi(cmd))
|
|
2850
|
+ rc_get_bool(cmd, &b);
|
|
2851
|
+ if (b)
|
2846
|
2852
|
{
|
2847
|
2853
|
gWorld.setFlag(World::fEnableHopping);
|
2848
|
2854
|
print(true, "Room hopping is on");
|
|
@@ -2855,7 +2861,8 @@ void OpenRaider::consoleCommand(char *cmd)
|
2855
|
2861
|
}
|
2856
|
2862
|
else if (rc_command("r_fog", cmd))
|
2857
|
2863
|
{
|
2858
|
|
- if (atoi(cmd))
|
|
2864
|
+ rc_get_bool(cmd, &b);
|
|
2865
|
+ if (b)
|
2859
|
2866
|
{
|
2860
|
2867
|
m_render.setFlags(Render::fFog);
|
2861
|
2868
|
}
|
|
@@ -2906,7 +2913,8 @@ void OpenRaider::consoleCommand(char *cmd)
|
2906
|
2913
|
}
|
2907
|
2914
|
else if (rc_command("r_oneroom", cmd))
|
2908
|
2915
|
{
|
2909
|
|
- if (atoi(cmd))
|
|
2916
|
+ rc_get_bool(cmd, &b);
|
|
2917
|
+ if (b)
|
2910
|
2918
|
{
|
2911
|
2919
|
m_render.setFlags(Render::fOneRoom);
|
2912
|
2920
|
}
|
|
@@ -2917,7 +2925,8 @@ void OpenRaider::consoleCommand(char *cmd)
|
2917
|
2925
|
}
|
2918
|
2926
|
else if (rc_command("r_allrooms", cmd))
|
2919
|
2927
|
{
|
2920
|
|
- if (atoi(cmd))
|
|
2928
|
+ rc_get_bool(cmd, &b);
|
|
2929
|
+ if (b)
|
2921
|
2930
|
{
|
2922
|
2931
|
m_render.setFlags(Render::fAllRooms);
|
2923
|
2932
|
}
|
|
@@ -2930,7 +2939,8 @@ void OpenRaider::consoleCommand(char *cmd)
|
2930
|
2939
|
}
|
2931
|
2940
|
else if (rc_command("r_sprite", cmd))
|
2932
|
2941
|
{
|
2933
|
|
- if (atoi(cmd))
|
|
2942
|
+ rc_get_bool(cmd, &b);
|
|
2943
|
+ if (b)
|
2934
|
2944
|
{
|
2935
|
2945
|
m_render.setFlags(Render::fSprites);
|
2936
|
2946
|
}
|
|
@@ -2941,7 +2951,8 @@ void OpenRaider::consoleCommand(char *cmd)
|
2941
|
2951
|
}
|
2942
|
2952
|
else if (rc_command("r_roommodel", cmd))
|
2943
|
2953
|
{
|
2944
|
|
- if (atoi(cmd))
|
|
2954
|
+ rc_get_bool(cmd, &b);
|
|
2955
|
+ if (b)
|
2945
|
2956
|
{
|
2946
|
2957
|
m_render.setFlags(Render::fRoomModels);
|
2947
|
2958
|
}
|
|
@@ -2952,7 +2963,8 @@ void OpenRaider::consoleCommand(char *cmd)
|
2952
|
2963
|
}
|
2953
|
2964
|
else if (rc_command("r_entmodel", cmd))
|
2954
|
2965
|
{
|
2955
|
|
- if (atoi(cmd))
|
|
2966
|
+ rc_get_bool(cmd, &b);
|
|
2967
|
+ if (b)
|
2956
|
2968
|
{
|
2957
|
2969
|
m_render.setFlags(Render::fEntityModels);
|
2958
|
2970
|
}
|
|
@@ -2963,7 +2975,8 @@ void OpenRaider::consoleCommand(char *cmd)
|
2963
|
2975
|
}
|
2964
|
2976
|
else if (rc_command("r_particle", cmd))
|
2965
|
2977
|
{
|
2966
|
|
- if (atoi(cmd))
|
|
2978
|
+ rc_get_bool(cmd, &b);
|
|
2979
|
+ if (b)
|
2967
|
2980
|
{
|
2968
|
2981
|
m_render.setFlags(Render::fParticles);
|
2969
|
2982
|
}
|
|
@@ -2974,7 +2987,8 @@ void OpenRaider::consoleCommand(char *cmd)
|
2974
|
2987
|
}
|
2975
|
2988
|
else if (rc_command("r_vis", cmd))
|
2976
|
2989
|
{
|
2977
|
|
- if (atoi(cmd))
|
|
2990
|
+ rc_get_bool(cmd, &b);
|
|
2991
|
+ if (b)
|
2978
|
2992
|
{
|
2979
|
2993
|
m_render.setFlags(Render::fUsePortals);
|
2980
|
2994
|
}
|
|
@@ -2985,7 +2999,8 @@ void OpenRaider::consoleCommand(char *cmd)
|
2985
|
2999
|
}
|
2986
|
3000
|
else if (rc_command("r_upf", cmd))
|
2987
|
3001
|
{
|
2988
|
|
- if (atoi(cmd))
|
|
3002
|
+ rc_get_bool(cmd, &b);
|
|
3003
|
+ if (b)
|
2989
|
3004
|
{
|
2990
|
3005
|
m_render.setFlags(Render::fUpdateRoomListPerFrame);
|
2991
|
3006
|
}
|
|
@@ -2996,7 +3011,8 @@ void OpenRaider::consoleCommand(char *cmd)
|
2996
|
3011
|
}
|
2997
|
3012
|
else if (rc_command("r_portal", cmd))
|
2998
|
3013
|
{
|
2999
|
|
- if (atoi(cmd))
|
|
3014
|
+ rc_get_bool(cmd, &b);
|
|
3015
|
+ if (b)
|
3000
|
3016
|
{
|
3001
|
3017
|
m_render.setFlags(Render::fPortals);
|
3002
|
3018
|
}
|
|
@@ -3007,7 +3023,8 @@ void OpenRaider::consoleCommand(char *cmd)
|
3007
|
3023
|
}
|
3008
|
3024
|
else if (rc_command("r_vmodel", cmd))
|
3009
|
3025
|
{
|
3010
|
|
- if (atoi(cmd))
|
|
3026
|
+ rc_get_bool(cmd, &b);
|
|
3027
|
+ if (b)
|
3011
|
3028
|
{
|
3012
|
3029
|
m_render.setFlags(Render::fViewModel);
|
3013
|
3030
|
}
|
|
@@ -3018,7 +3035,8 @@ void OpenRaider::consoleCommand(char *cmd)
|
3018
|
3035
|
}
|
3019
|
3036
|
else if (rc_command("r_ralpha", cmd))
|
3020
|
3037
|
{
|
3021
|
|
- if (atoi(cmd))
|
|
3038
|
+ rc_get_bool(cmd, &b);
|
|
3039
|
+ if (b)
|
3022
|
3040
|
{
|
3023
|
3041
|
m_render.setFlags(Render::fRoomAlpha);
|
3024
|
3042
|
}
|
|
@@ -3062,7 +3080,8 @@ void OpenRaider::consoleCommand(char *cmd)
|
3062
|
3080
|
{
|
3063
|
3081
|
m_flags |= OpenRaider_ShowFPS;
|
3064
|
3082
|
|
3065
|
|
- if (!atoi(cmd))
|
|
3083
|
+ rc_get_bool(cmd, &b);
|
|
3084
|
+ if (!b)
|
3066
|
3085
|
{
|
3067
|
3086
|
m_flags ^= OpenRaider_ShowFPS;
|
3068
|
3087
|
}
|