diff --git a/source/src/cube.h b/source/src/cube.h index 3b7b0207..77937834 100644 --- a/source/src/cube.h +++ b/source/src/cube.h @@ -326,7 +326,9 @@ enum // function signatures for script functions, see command.cpp #define WIN32_LEAN_AND_MEAN #include "windows.h" #define _WINDOWS - #define ZLIB_DLL + #define ZLIB_DLL + #define cos(x) cos((float)(x)) + #define sin(x) sin((float)(x)) #else #include #endif diff --git a/source/src/entities.cpp b/source/src/entities.cpp index d5b7c4f2..5269c666 100644 --- a/source/src/entities.cpp +++ b/source/src/entities.cpp @@ -252,6 +252,14 @@ void item(int num) if (num==7) { player1->hasarmour=!player1->hasarmour; /*toggle armour*/ }; -}; +}; + +void primary(int num) +{ + if(num>0 && num<7) player1->primary = num; + radd(player1); +} + -COMMAND(item,ARG_1INT); +COMMAND(item,ARG_1INT); +COMMAND(primary,ARG_1INT); diff --git a/source/src/rendermd3.cpp b/source/src/rendermd3.cpp index 655f22ae..d505a6a0 100644 --- a/source/src/rendermd3.cpp +++ b/source/src/rendermd3.cpp @@ -475,8 +475,7 @@ void rendermd3gun() sway.x*=swayspeed; sway.y*=swayspeed; - sway.z*=swayspeed; - + sway.z*=swayspeed; weapon->draw( player1->o.x-unitv.x*k_back+sway.x, player1->o.z-unitv.z*k_back+sway.z,