The online racing simulator
Pit work flags defined incorrectly [fixed]
prism_packets.php, the Pit Work flags seem to be defined incorrectly.

It should start with 1, then 2, 4 and so on, but it actually starts from (1 << 1) = 2. Also, it goes from PSE_FR_WHL = (1 << 4) to PSE_LE_FR_DAM = (1 << 6).

So I think it should be numbered like this instead. This one detected the pit work correctly in my plugin rather than the original one.


<?php 
// Pit Work Flags

define('PSE_NOTHING',       (<< 0)); // bit 0 (1)
define('PSE_STOP',          (<< 1)); // bit 1 (2)
define('PSE_FR_DAM',        (<< 2)); // bit 2 (4)
define('PSE_FR_WHL',        (<< 3)); // etc...
define('PSE_LE_FR_DAM',     (<< 4));
define('PSE_LE_FR_WHL',     (<< 5));
define('PSE_RI_FR_DAM',     (<< 6));
define('PSE_RI_FR_WHL',     (<< 7));
define('PSE_RE_DAM',        (<< 8));
define('PSE_RE_WHL',        (<< 9));
define('PSE_LE_RE_DAM',     (<< 10));
define('PSE_LE_RE_WHL',     (<< 11));
define('PSE_RI_RE_DAM',     (<< 12));
define('PSE_RI_RE_WHL',     (<< 13));
define('PSE_BODY_MINOR',    (<< 14));
define('PSE_BODY_MAJOR',    (<< 15));
define('PSE_SETUP',         (<< 16));
define('PSE_REFUEL',        (<< 17));
define('PSE_NUM',           20);
?>

Using PRISM 0.4.4.
If you want to submit the patch to github, I'll galdy merge it so you get credit in the history. Looks like we are squashing quite a few bugs, so I think a 0.4.5 would be a good idea to release soon.
I am not very familiar with GitHub, but I am willing to help. So what is the best way to submit the patch there?
Ideally you:
  1. Fork the project
  2. Make one or more well commented and clean commits to the repository. You can make a new branch here if you are modifying more than one part or feature.
  3. Perform a pull request in github's web interface.
Some projects won't use the pull request system. Check with the author or mailing list on the best way to get your code back into the project.
Alright, thanks. I (seem to) have done it all successfully
I got it, and I'll merge it soon into the main branch. Thanks for the fix!

FGED GREDG RDFGDR GSFDG