From 23f6429f3f6c1b0c4ab8a6995ad3e1d29ccc2ba6 Mon Sep 17 00:00:00 2001 From: driAn Date: Sun, 8 Jan 2006 14:05:34 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@104 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/cube.h | 4 +++- source/src/entities.cpp | 12 ++++++++++-- source/src/rendermd3.cpp | 3 +-- 3 files changed, 14 insertions(+), 5 deletions(-) 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,