added new functions

This commit is contained in:
Lukasz Wlasinksi
2005-05-31 13:56:15 +00:00
parent 959a5b9225
commit 1cc60fc9ad
9 changed files with 759 additions and 41 deletions

View File

@ -1,6 +1,6 @@
/*
* dodfun
* Copyright (c) 2004 Lukasz Wlasinski
* DoDFun
* Copyright (c) 2004 <EFBFBD>ukasz W<EFBFBD>asi<EFBFBD>ski
*
*
* This program is free software; you can redistribute it and/or modify it
@ -28,6 +28,7 @@
* version.
*
*/
#include "amxxmodule.h"
#include "dodfun.h"
@ -46,4 +47,65 @@ void Client_CurWeapon(void* mValue){
}
}
void Client_InitObj(void* mValue){
static int num;
if ( mDest != MSG_ALL )
return;
switch (mState++){
case 0:
num = 0;
mObjects.count = *(int*)mValue;
if ( mObjects.count == 0 )
mObjects.Clear();
break;
case 1:
mObjects.obj[num].pEdict = INDEXENT(*(int*)mValue);
break;
case 2:
mObjects.obj[num].index = *(int*)mValue;
break;
case 3:
mObjects.obj[num].default_owner = *(int*)mValue;
mObjects.obj[num].owner = mObjects.obj[num].default_owner;
break;
case 4:
mObjects.obj[num].visible = *(int*)mValue;
break;
case 5:
mObjects.obj[num].icon_neutral = *(int*)mValue;
break;
case 6:
mObjects.obj[num].icon_allies = *(int*)mValue;
break;
case 7:
mObjects.obj[num].icon_axis = *(int*)mValue;
break;
case 8:
mObjects.obj[num].origin_x = *(float*)mValue;
break;
case 9: // 8,9 coord
mObjects.obj[num].origin_y = *(float*)mValue;
mState = 1;
num++;
if ( num == mObjects.count ){
mObjects.Sort();
MF_ExecuteForward( iFInitCP );
}
break;
}
}
void Client_SetObj(void* mValue){
static int id;
switch (mState++){
case 0:
id = *(int*)mValue;
break;
case 1:
mObjects.obj[id].owner = *(int*)mValue;
break;
}
}