Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 6 commits
  • 8 files changed
  • 0 commit comments
  • 1 contributor
Commits on May 28, 2013
@fizzet fizzet call pcf when changing stats
Makes people die when intelligence-drained by Mind Flayers.
c6c7988
@fizzet fizzet when using items with TARGET_SELF always reset target mode afterwards
Fixes misbehaving items like MISC9Y in BG2.
6d8cf95
@fizzet fizzet when initiating dialog immediately suspend script execution
This essentially makes StartDialogue really block until the dialog
has actually started so that the script does not get a chance to alter
state in between.

Fixes the bandit plot in BG2 (JAHEIRA.BCS, JAHEIRAJ.DLG states 201-204).
7007465
Commits on May 30, 2013
@fizzet fizzet fix animation type for Yuan-Ti Mage 9b609e8
Commits on May 31, 2013
@fizzet fizzet don't print version string as "favourite spell" if there is none eed9eca
@fizzet fizzet extend ColorMod to additional palettes
This was missing from the dragon anim changes and should fix
Coverity 1026010.
fce07e2
View
2  gemrb/GUIScripts/GUIREC.py
@@ -786,7 +786,7 @@ def OpenInformationWindow ():
#favourite spell
Label = Window.GetControl (0x10000007)
- Label.SetText (stat['FavouriteSpell'])
+ Label.SetText (GemRB.GetString (stat['FavouriteSpell']))
#favourite weapon
Label = Window.GetControl (0x10000008)
View
46 gemrb/core/CharAnimations.cpp
@@ -312,12 +312,14 @@ void CharAnimations::CheckColorMod()
if (GlobalColorMod.type != RGBModifier::NONE) {
GlobalColorMod.type = RGBModifier::NONE;
GlobalColorMod.speed = 0;
- change[0]=change[1]=change[2]=change[3]=true;
+ for (int i = 0; i < PAL_MAX; ++i) {
+ change[i] = true;
+ }
}
}
unsigned int location;
- for (location = 0; location < 32; ++location) {
+ for (location = 0; location < PAL_MAX * 8; ++location) {
if (!ColorMods[location].phase) {
if (ColorMods[location].type != RGBModifier::NONE) {
ColorMods[location].type = RGBModifier::NONE;
@@ -437,7 +439,6 @@ void CharAnimations::SetupColors(PaletteType type)
}
}
-
if (needmod) {
if (!modifiedPalette[type])
modifiedPalette[type] = new Palette();
@@ -625,10 +626,8 @@ CharAnimations::CharAnimations(unsigned int AnimID, ieDword ArmourLevel)
{
Colors = NULL;
int i,j;
- for (i = 0; i < 4; ++i) {
- change[i] = true;
- }
for (i = 0; i < PAL_MAX; ++i) {
+ change[i] = true;
modifiedPalette[i] = NULL;
palette[i] = NULL;
}
@@ -654,7 +653,7 @@ CharAnimations::CharAnimations(unsigned int AnimID, ieDword ArmourLevel)
WeaponRef[0] = 0;
HelmetRef[0] = 0;
OffhandRef[0] = 0;
- for (i = 0; i < 32; ++i) {
+ for (i = 0; i < PAL_MAX * 8; ++i) {
ColorMods[i].type = RGBModifier::NONE;
ColorMods[i].speed = 0;
// make initial phase depend on location to make the pulse appear
@@ -2563,6 +2562,7 @@ void CharAnimations::AddHLSuffix(char* ResRef, unsigned char StanceID,
void CharAnimations::PulseRGBModifiers()
{
unsigned long time = core->GetGame()->Ticks;
+ int i;
if (time - lastModUpdate <= 40)
return;
@@ -2575,7 +2575,9 @@ void CharAnimations::PulseRGBModifiers()
GlobalColorMod.speed > 0)
{
GlobalColorMod.phase += inc;
- change[0] = change[1] = change[2] = change[3] = true;
+ for (i = 0; i < PAL_MAX; ++i) {
+ change[i] = true;
+ }
// reset if done
if (GlobalColorMod.phase > 2*GlobalColorMod.speed) {
@@ -2586,12 +2588,12 @@ void CharAnimations::PulseRGBModifiers()
}
}
- for (int i = 0; i < 32; ++i) {
+ for (i = 0; i < PAL_MAX * 8; ++i) {
if (ColorMods[i].type != RGBModifier::NONE &&
ColorMods[i].speed > 0)
{
- ColorMods[i].phase += inc;
change[i>>3] = true;
+ ColorMods[i].phase += inc;
if (ColorMods[i].phase > 2*ColorMods[i].speed) {
ColorMods[i].type = RGBModifier::NONE;
ColorMods[i].phase = 0;
@@ -2601,25 +2603,11 @@ void CharAnimations::PulseRGBModifiers()
}
}
- if (change[0]) {
- change[0]=0;
- SetupColors(PAL_MAIN);
- SetupColors(PAL_MAIN_2);
- SetupColors(PAL_MAIN_3);
- SetupColors(PAL_MAIN_4);
- SetupColors(PAL_MAIN_5);
- }
- if (change[1]) {
- change[1]=0;
- SetupColors(PAL_WEAPON);
- }
- if (change[2]) {
- change[2]=0;
- SetupColors(PAL_OFFHAND);
- }
- if (change[3]) {
- change[3]=0;
- SetupColors(PAL_HELMET);
+ for (i = 0; i < PAL_MAX; ++i) {
+ if (change[i]) {
+ change[i] = false;
+ SetupColors((PaletteType) i);
+ }
}
lastModUpdate += inc*40;
View
4 gemrb/core/CharAnimations.h
@@ -158,11 +158,11 @@ class GEM_EXPORT CharAnimations {
char OffhandRef[2];
public:
const ieDword *Colors; //these are the custom color indices
- RGBModifier ColorMods[32]; // color modification effects
+ RGBModifier ColorMods[PAL_MAX*8]; // color modification effects
unsigned long lastModUpdate;
RGBModifier GlobalColorMod; // global color modification effect
- bool change[4];
+ bool change[PAL_MAX];
Palette* palette[PAL_MAX];
Palette* modifiedPalette[PAL_MAX];
unsigned int AvatarsRowNum;
View
2  gemrb/core/GameScript/GSUtils.cpp
@@ -1138,6 +1138,8 @@ void BeginDialog(Scriptable* Sender, Action* parameters, int Flags)
}
Sender->ReleaseCurrentAction();
+ //force ProcessActions to suspend until dialog has started
+ Sender->SetWait(1);
if (!ret) {
if (Flags & BD_NOEMPTY) {
View
6 gemrb/core/Scriptable/Actor.cpp
@@ -3237,15 +3237,15 @@ int Actor::NewStat(unsigned int StatIndex, ieDword ModifierValue, ieDword Modifi
switch (ModifierType) {
case MOD_ADDITIVE:
//flat point modifier
- SetStat(StatIndex, Modified[StatIndex]+ModifierValue, 0);
+ SetStat(StatIndex, Modified[StatIndex]+ModifierValue, 1);
break;
case MOD_ABSOLUTE:
//straight stat change
- SetStat(StatIndex, ModifierValue, 0);
+ SetStat(StatIndex, ModifierValue, 1);
break;
case MOD_PERCENT:
//percentile
- SetStat(StatIndex, BaseStats[StatIndex] * ModifierValue / 100, 0);
+ SetStat(StatIndex, BaseStats[StatIndex] * ModifierValue / 100, 1);
break;
}
return Modified[StatIndex] - oldmod;
View
2  gemrb/plugins/GUIScript/GUIScript.cpp
@@ -9556,7 +9556,7 @@ static PyObject* GemRB_UseItem(PyObject * /*self*/, PyObject* args)
//
switch (forcetarget) {
case TARGET_SELF:
- gc->SetupItemUse(itemdata.slot, itemdata.headerindex, actor, GA_NO_DEAD, itemdata.TargetNumber);
+ gc->SetupItemUse(itemdata.slot, itemdata.headerindex, actor, GA_NO_DEAD, 1);
gc->TryToCast(actor, actor);
break;
case TARGET_NONE:
View
2  gemrb/unhardcoded/bg1/avatars.2da
@@ -316,7 +316,7 @@
0xEC20 MWI3 MWI3 MWI3 MWI3 9 2 1 *
0xED00 MYU1 MYU1 MYU1 MYU1 9 2 1 *
0xED10 MYU2 MYU2 MYU2 MYU2 9 2 1 *
-0xED20 MYU3 MYU3 MYU3 MYU3 9 2 1 *
+0xED20 MYU3 MYU3 MYU3 MYU3 16 2 1 *
0xEE00 MZO2 MZO2 MZO2 MZO2 9 2 1 *
0xEE10 MZO3 MZO3 MZO3 MZO3 9 2 1 *
0xEF00 MWWE MWWE MWWE MWWE 9 2 1 *
View
2  gemrb/unhardcoded/bg2/avatars.2da
@@ -326,7 +326,7 @@
0xEC20 MWI3 MWI3 MWI3 MWI3 9 2 1 *
0xED00 MYU1 MYU1 MYU1 MYU1 9 2 1 *
0xED10 MYU2 MYU2 MYU2 MYU2 9 2 1 *
-0xED20 MYU3 MYU3 MYU3 MYU3 9 2 1 *
+0xED20 MYU3 MYU3 MYU3 MYU3 16 2 1 *
0xEE00 MZO2 MZO2 MZO2 MZO2 9 2 1 *
0xEE10 MZO3 MZO3 MZO3 MZO3 9 2 1 *
0xEF00 MWWE MWWE MWWE MWWE 9 2 1 *

No commit comments for this range

Something went wrong with that request. Please try again.