Compile this for Linux?
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); } |
Re: Compile this for Linux?
|
All times are GMT -4. The time now is 20:58. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.