Raised This Month: $51 Target: $400
 12% 

Compile this for Linux?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Austinbots
Member
Join Date: Jan 2010
Old 01-31-2012 , 23:29   Compile this for Linux?
Reply With Quote #1

I moved my game server from a local dedicated server here on the LAN to
gameservers.com
man they rock!

But part of the reason they rock is they run linux.
I was running windoez and built this simple mm plugin.
But I don't have linux.

Can someone be so kind to compile this for linux?

One function mm plugin...

// ----------------------------------------------------------
// TraceLine()
// Disallow headshot damage to human players
// Disallow every 3rd bullet hit to human players
// ---------------------------------------------------------
void TraceLine(const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr)
{
static int skipHit = 0;

TRACE_LINE(v1, v2, fNoMonsters, pentToSkip, ptr);

// is a human taking damage?
if ( (ptr->pHit->v.flags & FL_CLIENT) && !(ptr->pHit->v.flags & FL_FAKECLIENT) )
//if ( !(ptr->pHit->v.flags & FL_FAKECLIENT) )
{
// is it a head shot?
if( (1<<HITGROUP_HEAD) & (1<<ptr->iHitgroup) )
{
// disallow head shots to humans, return no damage
ptr->flFraction = 1.0;
RETURN_META(MRES_SUPERCEDE);
}
else if
(
((1<<HITGROUP_HEAD) & (1<<ptr->iHitgroup)) ||
((1<<HITGROUP_CHEST) & (1<<ptr->iHitgroup)) ||
((1<<HITGROUP_STOMACH) & (1<<ptr->iHitgroup)) ||
((1<<HITGROUP_LEFTARM) & (1<<ptr->iHitgroup)) ||
((1<<HITGROUP_RIGHTARM) & (1<<ptr->iHitgroup)) ||
((1<<HITGROUP_LEFTLEG) & (1<<ptr->iHitgroup)) ||
((1<<HITGROUP_RIGHTLEG) & (1<<ptr->iHitgroup)) )
{
if(skipHit >= 3)
{
// skip some damage
skipHit = 0;
ptr->flFraction = 1.0;
RETURN_META(MRES_SUPERCEDE);
}
else
{
skipHit++;
}
}
}// not a human
RETURN_META(MRES_IGNORED);
}
Austinbots is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:20.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode