how to change base speed in the middle of the race?
#1
i made this really simple code that changes the base speed of the game if a flag is set. however, when the code gets executed, the speedometer still shows the old speed (speedometer shows 84.01 as max non-wheelie speed before the code is executed on funky flame, same after it gets executed) but if i respawn, speedometer shows 84.85 (updated speed) as the max non-wheelie speed. i tried to run some function in hope that the speedometer would show the updated speed (0x80574304, aka the updateVehicleSpeed function), but the game would just crash.

Code:
#To be inserted at 80571CA4
head:
  lis r11, 0x8000
  lbz r10, 0x1d0(r11)
  cmpwi r10, 1

  beq set
  b not


set:
  lis r12, 0x42b4 #r12=90 in float
  stw r12, 24(r3)
  b def

not:
  lis r12, 0x42a8 #r12=84 in float

def:
  lfs f1, 24(r3) #default instruction
Reply
#2
Hello weeg! Welcome to MarioKartWii.com.

In regards to your code issue, it may be an Vehicle Speed vs XYZ Speed ordeal. When you use the term 'speedometer', are you referring to Stebler's pretty speedometer? I know in his old version (he released a new version today), it used vehicle speed. Not sure on the new version though.

Another reason for the issue could be the hook address(s) used on whatever speedometer you used for testing is unreliable.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)