Weapons::Weapons()
{
- rotation1.resize(max_weaponinstances);
- rotation2.resize(max_weaponinstances);
- rotation3.resize(max_weaponinstances);
- bigrotation.resize(max_weaponinstances);
- bigtilt.resize(max_weaponinstances);
- bigtilt2.resize(max_weaponinstances);
- smallrotation.resize(max_weaponinstances);
- smallrotation2.resize(max_weaponinstances);
- damage.resize(max_weaponinstances);
-
numweapons = 0;
- tippoint.resize(max_weaponinstances);
- oldtippoint.resize(max_weaponinstances);
- position.resize(max_weaponinstances);
- lastmult.resize(max_weaponinstances);
- oldposition.resize(max_weaponinstances);
- velocity.resize(max_weaponinstances);
- tipvelocity.resize(max_weaponinstances);
- type.resize(max_weaponinstances);
- oldowner.resize(max_weaponinstances);
- owner.resize(max_weaponinstances);
- bloody.resize(max_weaponinstances);
- blooddrip.resize(max_weaponinstances);
- blooddripdelay.resize(max_weaponinstances);
- onfire.resize(max_weaponinstances);
- flamedelay.resize(max_weaponinstances);
- missed.resize(max_weaponinstances);
- mass.resize(max_weaponinstances);
- tipmass.resize(max_weaponinstances);
- length.resize(max_weaponinstances);
- freetime.resize(max_weaponinstances);
- firstfree.resize(max_weaponinstances);
- physics.resize(max_weaponinstances);
- drawhowmany.resize(max_weaponinstances);
- hitsomething.resize(max_weaponinstances);
-
- lastdrawnposition.resize(max_weaponinstances);
- lastdrawntippoint.resize(max_weaponinstances);
- lastdrawnrotation1.resize(max_weaponinstances);
- lastdrawnrotation2.resize(max_weaponinstances);
- lastdrawnrotation3.resize(max_weaponinstances);
- lastdrawnbigrotation.resize(max_weaponinstances);
- lastdrawnbigtilt.resize(max_weaponinstances);
- lastdrawnbigtilt2.resize(max_weaponinstances);
- lastdrawnsmallrotation.resize(max_weaponinstances);
- lastdrawnsmallrotation2.resize(max_weaponinstances);
- lastdrawnanim.resize(max_weaponinstances);
// Model throwingknifemodel;
knifetextureptr = 0;
{
public:
- std::vector<float> rotation1,rotation2,rotation3;
- std::vector<float> bigrotation;
- std::vector<float> bigtilt;
- std::vector<float> bigtilt2;
- std::vector<float> smallrotation;
- std::vector<float> smallrotation2;
+ float rotation1[max_weaponinstances];
+ float rotation2[max_weaponinstances];
+ float rotation3[max_weaponinstances];
+ float bigrotation[max_weaponinstances];
+ float bigtilt[max_weaponinstances];
+ float bigtilt2[max_weaponinstances];
+ float smallrotation[max_weaponinstances];
+ float smallrotation2[max_weaponinstances];
int numweapons;
- std::vector<float> damage;
- std::vector<XYZ> tippoint;
- std::vector<XYZ> oldtippoint;
- std::vector<XYZ> position;
- std::vector<float> lastmult;
- std::vector<XYZ> oldposition;
- std::vector<XYZ> velocity;
- std::vector<XYZ> tipvelocity;
- std::vector<int> type;
- std::vector<int> oldowner;
- std::vector<int> owner;
- std::vector<int> bloody;
- std::vector<float> blooddrip;
- std::vector<float> blooddripdelay;
- std::vector<bool> onfire;
- std::vector<float> flamedelay;
- std::vector<bool> missed;
- std::vector<float> mass;
- std::vector<float> tipmass;
- std::vector<float> length;
- std::vector<float> freetime;
- std::vector<bool> firstfree;
- std::vector<bool> physics;
- std::vector<float> drawhowmany;
- std::vector<bool> hitsomething;
+ float damage[max_weaponinstances];
+ XYZ tippoint[max_weaponinstances];
+ XYZ oldtippoint[max_weaponinstances];
+ XYZ position[max_weaponinstances];
+ float lastmult[max_weaponinstances];
+ XYZ oldposition[max_weaponinstances];
+ XYZ velocity[max_weaponinstances];
+ XYZ tipvelocity[max_weaponinstances];
+ int type[max_weaponinstances];
+ int oldowner[max_weaponinstances];
+ int owner[max_weaponinstances];
+ int bloody[max_weaponinstances];
+ float blooddrip[max_weaponinstances];
+ float blooddripdelay[max_weaponinstances];
+ bool onfire[max_weaponinstances];
+ float flamedelay[max_weaponinstances];
+ bool missed[max_weaponinstances];
+ float mass[max_weaponinstances];
+ float tipmass[max_weaponinstances];
+ float length[max_weaponinstances];
+ float freetime[max_weaponinstances];
+ bool firstfree[max_weaponinstances];
+ bool physics[max_weaponinstances];
+ float drawhowmany[max_weaponinstances];
+ bool hitsomething[max_weaponinstances];
- std::vector<XYZ> lastdrawnposition;
- std::vector<XYZ> lastdrawntippoint;
- std::vector<float> lastdrawnrotation1,lastdrawnrotation2,lastdrawnrotation3;
- std::vector<float> lastdrawnbigrotation;
- std::vector<float> lastdrawnbigtilt;
- std::vector<float> lastdrawnbigtilt2;
- std::vector<float> lastdrawnsmallrotation;
- std::vector<float> lastdrawnsmallrotation2;
- std::vector<int> lastdrawnanim;
+ XYZ lastdrawnposition[max_weaponinstances];
+ XYZ lastdrawntippoint[max_weaponinstances];
+ float lastdrawnrotation1[max_weaponinstances];
+ float lastdrawnrotation2[max_weaponinstances];
+ float lastdrawnrotation3[max_weaponinstances];
+ float lastdrawnbigrotation[max_weaponinstances];
+ float lastdrawnbigtilt[max_weaponinstances];
+ float lastdrawnbigtilt2[max_weaponinstances];
+ float lastdrawnsmallrotation[max_weaponinstances];
+ float lastdrawnsmallrotation2[max_weaponinstances];
+ int lastdrawnanim[max_weaponinstances];
Model throwingknifemodel;
GLuint knifetextureptr;