Monthly Target: $400 Donations: $76
 19% 

Compile this for Linux?


Post New Thread Reply   
 
Thread Tools Display Modes
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
Austinbots
Member
Join Date: Jan 2010
Old 02-03-2012 , 04:25   Re: Compile this for Linux?
Reply With Quote #2

Austin, here it is ported to sourcemod....

http://forums.alliedmods.net/showthr...56#post1643556

Last edited by Austinbots; 02-03-2012 at 04:26.
Austinbots is offline
Reply


Thread Tools
Display Modes

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 22:58.


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