mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
* fixed bullet artifacts and removal !
* hopefull disable of grenades * added a LOS check from your mercs to a door to see if it should be animated or not. * looked into the "ENEMY_ENABLED" issue, it is not double defined, the one in network.h is part of a struct and not connected. made some changes to do tests for ==0 or ==1 rather than boolean. but i believe there must be some misunderstanding possibly. ENEMY_ENABLED only enables or disables the enemy AI, And only when coop is enabled... when its not there is no ai whatsoever, but you can still get into deathmatch battle under the various ini settings. enjoy, the bullets are finishing themselves off much better now ! :) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2168 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+29
-8
@@ -96,6 +96,8 @@ unsigned char packetIdentifier;
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
#include "keys.h"
|
||||
|
||||
#include "new.h"
|
||||
#include "Types.h"
|
||||
#include "connect.h"
|
||||
@@ -240,10 +242,10 @@ char ckbag[100];
|
||||
int REPORT_NAME;
|
||||
int WEAPON_READIED_BONUS;
|
||||
|
||||
int ENEMY_ENABLED=0;
|
||||
int CREATURE_ENABLED=0;
|
||||
int MILITIA_ENABLED=0;
|
||||
int CIV_ENABLED=0;
|
||||
int ENEMY_ENABLED;
|
||||
int CREATURE_ENABLED;
|
||||
int MILITIA_ENABLED;
|
||||
int CIV_ENABLED;
|
||||
|
||||
int ALLOW_EQUIP;
|
||||
|
||||
@@ -1925,6 +1927,7 @@ void recieveBULLET(RPCParameters *rpcParameters)
|
||||
BULLET * pBullet;
|
||||
|
||||
iBullet = CreateBullet( netb->net_bullet.ubFirerID, 0, netb->net_bullet.usFlags,netb->usHandItem );
|
||||
|
||||
if (iBullet == -1)
|
||||
{
|
||||
ScreenMsg( FONT_YELLOW, MSG_CHAT, L"Failed to create bullet");
|
||||
@@ -1934,6 +1937,8 @@ void recieveBULLET(RPCParameters *rpcParameters)
|
||||
bTable[bTeam][net_iBullet].remote_id = net_iBullet;
|
||||
bTable[bTeam][net_iBullet].local_id = iBullet;
|
||||
|
||||
|
||||
|
||||
pBullet = GetBulletPtr( iBullet );
|
||||
|
||||
//ScreenMsg( FONT_YELLOW, MSG_CHAT, L"Created Bullet Id: %d",iBullet);
|
||||
@@ -2120,14 +2125,17 @@ void send_miss(EV_S_MISS * SMiss)
|
||||
void recievehitSTRUCT (RPCParameters *rpcParameters)
|
||||
{
|
||||
EV_S_STRUCTUREHIT* struct_hit = (EV_S_STRUCTUREHIT*)rpcParameters->input;
|
||||
|
||||
//ScreenMsg( FONT_YELLOW, MSG_CHAT, L"recieved structure hit");
|
||||
SOLDIERTYPE *pSoldier = MercPtrs[ struct_hit->ubAttackerID ];
|
||||
INT8 bTeam=pSoldier->bTeam;
|
||||
INT32 iBullet = bTable[bTeam][struct_hit->iBullet].local_id;
|
||||
|
||||
|
||||
if(struct_hit->fStopped)StopBullet( iBullet );//, ScreenMsg( FONT_YELLOW, MSG_CHAT, L"bullet stopped");
|
||||
StructureHit( iBullet, struct_hit->usWeaponIndex, struct_hit->bWeaponStatus, struct_hit->ubAttackerID, struct_hit->sXPos, struct_hit->sYPos, struct_hit->sZPos, struct_hit->usStructureID, struct_hit->iImpact, struct_hit->fStopped );
|
||||
if(struct_hit->fStopped)RemoveBullet(iBullet);
|
||||
//ScreenMsg( FONT_YELLOW, MSG_CHAT, L"recieved structure hit");
|
||||
if(struct_hit->fStopped)RemoveBullet(iBullet);//, ScreenMsg( FONT_YELLOW, MSG_CHAT, L"bullet removed");
|
||||
//else ScreenMsg( FONT_YELLOW, MSG_CHAT, L"bullet left");
|
||||
|
||||
}
|
||||
void recievehitWINDOW (RPCParameters *rpcParameters)
|
||||
{
|
||||
@@ -2420,7 +2428,15 @@ void recieve_door (RPCParameters *rpcParameters)
|
||||
doors* sDoor = (doors*)rpcParameters->input;
|
||||
|
||||
SOLDIERTYPE *pSoldier = MercPtrs[ sDoor->ubID ];
|
||||
HandleDoorChangeFromGridNo( pSoldier, sDoor->sGridNo, sDoor->fNoAnimations );
|
||||
BOOLEAN fNoAnimations = FALSE;
|
||||
|
||||
if ( !AllMercsLookForDoor( sDoor->sGridNo, FALSE ) )//check for los
|
||||
{
|
||||
fNoAnimations = TRUE;
|
||||
}
|
||||
|
||||
|
||||
HandleDoorChangeFromGridNo( pSoldier, sDoor->sGridNo, fNoAnimations );
|
||||
|
||||
}
|
||||
|
||||
@@ -2578,6 +2594,11 @@ void connect_client ( void )
|
||||
gTacticalStatus.uiFlags&= (~SHOW_ALL_MERCS );
|
||||
memset( &readyteamreg , 0 , sizeof (int) * 10);
|
||||
|
||||
ENEMY_ENABLED=0;
|
||||
CREATURE_ENABLED=0;
|
||||
MILITIA_ENABLED=0;
|
||||
CIV_ENABLED=0;
|
||||
|
||||
//retrieve settings from Ja2_mp.ini
|
||||
char ip[30];
|
||||
char port[30];
|
||||
|
||||
Reference in New Issue
Block a user