Skip to content
This repository has been archived by the owner on Jan 16, 2022. It is now read-only.

Commit

Permalink
Resolved #109; fixed #108; fixed #107
Browse files Browse the repository at this point in the history
  • Loading branch information
munawarb committed Sep 10, 2019
1 parent 6b417be commit bc6a714
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 15 deletions.
2 changes: 1 addition & 1 deletion TDV/Common.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public static bool error
private static bool loadedReg;
public static bool ACBMode = false;
public static bool failedConnect;
private static ExtraItem[] musicExtraItem;
public static ExtraItem[] musicExtraItem;
private static ExtraItem[] serverExtraItem;
public static IntPtr guiHandle;
public static String input;
Expand Down
4 changes: 2 additions & 2 deletions TDV/FightObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@ protected ExtendedAudioBuffer loadSound(string filename)
{
ExtendedAudioBuffer s = null;
if (isAI)
s = DSound.LoadSound(DSound.SoundPath + "\\a_" + filename);
s = DSound.LoadSoundAlwaysLoud(DSound.SoundPath + "\\a_" + filename);
else
s = DSound.LoadSound(DSound.SoundPath + "\\" + filename);
s = DSound.LoadSoundAlwaysLoud(DSound.SoundPath + "\\" + filename);
return s;
}

Expand Down
19 changes: 15 additions & 4 deletions TDV/Interaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1624,10 +1624,21 @@ private static bool startFight(FightType fightType)
lost = player.damage <= 0;
if (!lost)
won = opp.damage <= 0;
if (DXInput.isFirstPress(Key.H, false))
SelfVoice.NLS("#" + player.getHealthPercentage() + "&p.wav", true, true);
if (DXInput.isFirstPress(Key.T, false))
SelfVoice.NLS("#" + opp.getHealthPercentage() + "&p.wav", true, true);
if (DXInput.isFirstPress(Key.H, false)) {
Common.executeSvOrSr(() =>
{
SelfVoice.setPathTo("n");
SelfVoice.NLS("#" + player.getHealthPercentage() + "&p.wav", true, true);
}, () => SapiSpeech.speak($"{player.getHealthPercentage()}%"), Options.statusVoiceMode);
}
if (DXInput.isFirstPress(Key.T, false)) {
Common.executeSvOrSr(() =>
{
SelfVoice.setPathTo("n");
SelfVoice.NLS("#" + opp.getHealthPercentage() + "&p.wav", true, true);
}, () => SapiSpeech.speak($"{opp.getHealthPercentage()}%"), Options.statusVoiceMode);
}
Common.executeExtraCommands(Common.musicExtraItem);
Thread.Sleep(5);
} //while
Common.fadeMusic();
Expand Down
1 change: 1 addition & 0 deletions TDV/Mission.cs
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ public static void enterMissionMode()
pointsWorth = 0; //reset the point value
if (!Options.isDemo)
readFromFile();
racingScore = deathMatchScore = 200;
bool rComplete = (Options.loadedFromMainMenu) ? true : (racingScore >= passingRacingScore);
bool dComplete = (Options.loadedFromMainMenu) ? true : (deathMatchScore >= passingDeathMatchScore);
if (!Options.loadedFromMainMenu)
Expand Down
8 changes: 2 additions & 6 deletions TDV/Person.cs
Original file line number Diff line number Diff line change
Expand Up @@ -335,10 +335,6 @@ public void move()
move(Person.MovementDirection.south, DXInput.isFirstPress(Key.Down));
else if (DXInput.isKeyHeldDown(Key.Left))
move(Person.MovementDirection.west, DXInput.isFirstPress(Key.Left));
if (DXInput.isFirstPress(Key.F6))
Common.decreaseMusicVolume();
if (DXInput.isFirstPress(Key.F7))
Common.increaseMusicVolume();
}
if (swinging && (DateTime.Now - startSwingTime).TotalMilliseconds > 200)
doPunch();
Expand Down Expand Up @@ -508,8 +504,8 @@ private void seekRandomFurniture()
public override void playCrashSound(int x, int y)
{
if (crashSound == null)
crashSound = DSound.LoadSound(DSound.SoundPath + "\\a_fwall.wav");
DSound.PlaySound3d(crashSound, true, false, x, y, 0);
crashSound = DSound.LoadSoundAlwaysLoud(DSound.SoundPath + "\\a_fwall.wav");
DSound.PlaySound3d(crashSound, true, false, x, 0, y);
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions TDV/PersonMissile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public PersonMissile(Person thrower, Person target, int speed, int maxDamage)
this.maxDamage = maxDamage;
this.target = target;
startTime = DateTime.Now;
moveSound = DSound.LoadSound(DSound.SoundPath + "\\a_mmove.wav");
explodeSound = DSound.LoadSound(DSound.SoundPath + "\\a_mexpl.wav");
moveSound = DSound.LoadSoundAlwaysLoud(DSound.SoundPath + "\\a_mmove.wav");
explodeSound = DSound.LoadSoundAlwaysLoud(DSound.SoundPath + "\\a_mexpl.wav");
DSound.PlaySound3d(moveSound, true, true, x, 0, y);
}

Expand Down

0 comments on commit bc6a714

Please sign in to comment.