Home » SIRTECH CLASSICS » Jagged Alliance 2 » Jagged Alliance 2 General » Who said using knuckles isn't cheating in San Mona boxing?
Who said using knuckles isn't cheating in San Mona boxing?[message #225494] Sat, 04 July 2009 17:32 Go to next message
Shanga is currently offline Shanga

 
Messages:3480
Registered:January 2000
Location: Danubia
Quote:

if ( gTacticalStatus.bBoxingState == BOXING )
{
// should have a check for "in boxing ring", no?
if ( ( pSoldier->usAttackingWeapon != NOTHING && !Item[pSoldier->usAttackingWeapon].brassknuckles ) || !( pSoldier->flags.uiStatusFlags & SOLDIER_BOXER ) )
{
// someone's cheating!
if ( (Item[ pSoldier->usAttackingWeapon ].usItemClass == IC_BLADE || Item[ pSoldier->usAttackingWeapon ].usItemClass == IC_PUNCH) && (pTarget->flags.uiStatusFlags & SOLDIER_BOXER) )
{
// knife or brass knuckles disqualify the player!
BoxingPlayerDisqualified( pSoldier, BAD_ATTACK );
}

Report message to a moderator

Captain
Re: Who said using knuckles isn't cheating in San Mona boxing?[message #225496] Sat, 04 July 2009 17:37 Go to previous messageGo to next message
Logisteric

 
Messages:3199
Registered:December 2008
Location: B
what does his shanginess want to tell us (especially if we are maccie) with that?

Report message to a moderator

Captain
Re: Who said using knuckles isn't cheating in San Mona boxing?[message #225500] Sat, 04 July 2009 17:50 Go to previous messageGo to next message
Shanga is currently offline Shanga

 
Messages:3480
Registered:January 2000
Location: Danubia
Someone mentioned in an earlier discussion that he used brass knuckles on Bull to fight in San Mona event. And unless the weapon type of brass knuckles has been tempered with, that should trigger the "cheat" condition above.

But then I wonder if game has a check for "blunt weapons".

Report message to a moderator

Captain
Re: Who said using knuckles isn't cheating in San Mona boxing?[message #225503] Sat, 04 July 2009 17:59 Go to previous messageGo to next message
Logisteric

 
Messages:3199
Registered:December 2008
Location: B
thanks, i dont bother you guys speaking chinese in those smp-threads, but here i prefer plain english :shake:

Report message to a moderator

Captain
Re: Who said using knuckles isn't cheating in San Mona boxing?[message #225508] Sat, 04 July 2009 18:12 Go to previous messageGo to next message
Shanga is currently offline Shanga

 
Messages:3480
Registered:January 2000
Location: Danubia
you mean if ( pMember->usWrites == CODE )
{
LogistericMemberFallsAsleep( pMember, BORING_RAMBLING );
}

eh, why didn't you put it like that?

Report message to a moderator

Captain
Re: Who said using knuckles isn't cheating in San Mona boxing?[message #225509] Sat, 04 July 2009 18:20 Go to previous messageGo to next message
jay.pea is currently offline jay.pea

 
Messages:25
Registered:March 2009
Location: Munich, Germany
brass knuckles are indeed not considered cheating because the cheating check will only be executed if the attacking weapon is not flagged as brassknuckles.
!Item[pSoldier->usAttackingWeapon].brassknuckles

Report message to a moderator

Private 1st Class
Re: Who said using knuckles isn't cheating in San Mona boxing?[message #225518] Sat, 04 July 2009 19:32 Go to previous messageGo to next message
Roadkill is currently offline Roadkill

 
Messages:155
Registered:May 2001
Location: Lords of the Bytes
The very few games i actually bother to fight, i used brass knuckles. No problem. Has never been a problem afaik. That's "testing" not "reading code" Wink

Report message to a moderator

Staff Sergeant
Re: Who said using knuckles isn't cheating in San Mona boxing?[message #225521] Sat, 04 July 2009 20:06 Go to previous messageGo to next message
gmonk

 
Messages:670
Registered:April 2002
Location: Newfoundland, Canada
Bear's Pit Surgeon General Warning:

A [color:#FF6600]moderate[/color] outbreak of [color:#000099]B.codegeekitis[/color] has been indicated in this region: [color:#CC0000]Bear's Pit JA Community[/color]

If, in the course of regular posting and associated activities, you experience any of the following symptoms please report to the SMP or HAM forums for immediate treatment:

-anal leakage
-excessive discussion of program routines
-gassy discharges after digesting a post
-unusual changes from banter to serious discussion
-insertion of mysterious 'programmer' humour into regular posting behaviour
-changes of routine behaviour including, but not limited to, reading game code and using compiler paraphenalia

Patient Zero has been indentified but is still at large. Here is a sample post. Do not approach any posters exhibiting this behaviour, it may be highly contagious and lead to an interest in game coding!

Shanga
you mean if ( pMember->usWrites == CODE )
{
LogistericMemberFallsAsleep( pMember, BORING_RAMBLING );
}

eh, why didn't you put it like that?


Office of the Surgeon General, Bear's Pit Sector,
:diabolical:

EDIT: Was that in the original game code? The allowed use of brass knuckles, I mean. I believe it was. Perhaps it was changed after someone played Fallout 2, the New Reno boxing had a 'cheat' that allowed you to use 'loaded' boxing gloves in the fights.

[Updated on: Sat, 04 July 2009 20:09] by Moderator

Report message to a moderator

First Sergeant
Re: Who said using knuckles isn't cheating in San Mona boxing?[message #225523] Sat, 04 July 2009 20:15 Go to previous messageGo to next message
Shanga is currently offline Shanga

 
Messages:3480
Registered:January 2000
Location: Danubia
That's a wierd check badly built, I admit, thus doesn't function as it should. But the above code should've been read as:

if BOXING
1. (checks if you anything but NOTHING/knuckles)
=> moves on to step 2
2. (checks 2nd time if you have IC_BLADE or IC_PUNCH type of weapons equiped)
=> triggers cheat flag

Instead of step 2 triggering the cheat flag, game does only check 1 and ignores step 2. Correct me if I am wrong. That's what the acolades tell me. Step 1 includes the step 2 check but that's not performed.



	if ( gTacticalStatus.bBoxingState == BOXING )
	{
		// should have a check for "in boxing ring", no?
		if ( ( pSoldier->usAttackingWeapon != NOTHING && !Item[pSoldier->usAttackingWeapon].brassknuckles ) || !( pSoldier->flags.uiStatusFlags & SOLDIER_BOXER ) )
		{
			// someone's cheating!
			if ( (Item[ pSoldier->usAttackingWeapon ].usItemClass == IC_BLADE || Item[ pSoldier->usAttackingWeapon ].usItemClass == IC_PUNCH) && (pTarget->flags.uiStatusFlags & SOLDIER_BOXER) )
			{
				// knife or brass knuckles disqualify the player!
				BoxingPlayerDisqualified( pSoldier, BAD_ATTACK );
			}
			else
			{
				// anything else is open war!
				//gTacticalStatus.bBoxingState = NOT_BOXING;
				SetBoxingState( NOT_BOXING );
				// if we are attacking a boxer we should set them to neutral (temporarily) so that the rest of the civgroup code works...
				if ( (pTarget->bTeam == CIV_TEAM) && (pTarget->flags.uiStatusFlags & SOLDIER_BOXER) )
				{
					SetSoldierNeutral( pTarget );
				}
			}

		}

Report message to a moderator

Captain
Re: Who said using knuckles isn't cheating in San Mona boxing?[message #225524] Sat, 04 July 2009 20:23 Go to previous messageGo to next message
gmonk

 
Messages:670
Registered:April 2002
Location: Newfoundland, Canada
It looks like it intentionally skips brass knuckles on purpose.

Report message to a moderator

First Sergeant
Re: Who said using knuckles isn't cheating in San Mona boxing?[message #225526] Sat, 04 July 2009 20:26 Go to previous messageGo to next message
Shanga is currently offline Shanga

 
Messages:3480
Registered:January 2000
Location: Danubia
Item[pSoldier->usAttackingWeapon].brassknuckles
Item[ pSoldier->usAttackingWeapon ].usItemClass == IC_PUNCH
Item[ pSoldier->usAttackingWeapon ].usItemClass == IC_BLADE

Wonder why the extra spaces within the [ ] in 2nd and 3rd rows. I only found such syntax in a CtH syntax, the rest have no spaces. But maybe not related at all.


Ah nvm, since they put brassknuckles in first exception, no further checks are executed. doh... Looks like someone either added it later or the one who wrote the comment didn't have a clue what he just coded.

[Updated on: Sat, 04 July 2009 21:47] by Moderator

Report message to a moderator

Captain
Re: Who said using knuckles isn't cheating in San Mona boxing?[message #225530] Sat, 04 July 2009 20:43 Go to previous message
gmonk

 
Messages:670
Registered:April 2002
Location: Newfoundland, Canada
There shouldn't be any difference due to the added whitespace:

http://www.osdata.com/topic/language/cplus.htm
white space:
White space in C++ includes the blank (space character), horizontal tab, end-of-line, vertical tab, form feed, and comments. White space is ignored by the compiler (except when required to separate tokens or when used in a character or string constant)...


Basically, outside of using character strings, whitespace within a program is only there for human readability.

I'm not much of a coder, so this may well have exceptions I'm unaware of.

Report message to a moderator

First Sergeant
Previous Topic: Thank You All!
Next Topic: Bobby Ray Settings
Goto Forum:
  


Current Time: Tue Jan 14 22:49:16 GMT+2 2025

Total time taken to generate the page: 0.01615 seconds