• R/O
  • SSH
  • HTTPS

marathon: コミット


コミットメタ情報

リビジョン515 (tree)
日時2012-01-31 22:18:11
作者logue

ログメッセージ

r4693とマージ
爆発効果のインデックスが-1の時に、殺傷メッセージでクラッシュする問題を修正。
Luaのアクセサににattacks_immediatelyと、waits_with_clear_shotを追加。

変更サマリ

差分

--- marathon/trunk/Source_Files/Lua/lua_monsters.cpp (revision 514)
+++ marathon/trunk/Source_Files/Lua/lua_monsters.cpp (revision 515)
@@ -482,6 +482,7 @@
482482 }
483483
484484 const luaL_reg Lua_MonsterType_Get[] = {
485+ {"attacks_immediately", Lua_MonsterType_Get_Flag<_monster_attacks_immediately>},
485486 {"cannot_be_dropped", Lua_MonsterType_Get_Flag<_monster_cannot_be_dropped>},
486487 {"class", Lua_MonsterType_Get_Class},
487488 {"enemies", Lua_MonsterType_Get_Enemies},
@@ -501,10 +502,12 @@
501502 {"random_location", Lua_MonsterType_Get_Random_Location},
502503 {"total_available", Lua_MonsterType_Get_Random_Count},
503504 {"weaknesses", Lua_MonsterType_Get_Weaknesses},
505+ {"waits_with_clear_shot", Lua_MonsterType_Get_Flag<_monster_waits_with_clear_shot>},
504506 {0, 0}
505507 };
506508
507509 const luaL_reg Lua_MonsterType_Set[] = {
510+ {"attacks_immediately", Lua_MonsterType_Set_Flag<_monster_attacks_immediately>},
508511 {"cannot_be_dropped", Lua_MonsterType_Set_Flag<_monster_cannot_be_dropped>},
509512 {"class", Lua_MonsterType_Set_Class},
510513 {"initial_count", Lua_MonsterType_Set_Initial_Count},
@@ -516,6 +519,7 @@
516519 {"random_chance", Lua_MonsterType_Set_Random_Chance},
517520 {"random_location", Lua_MonsterType_Set_Random_Location},
518521 {"total_available", Lua_MonsterType_Set_Random_Count},
522+ {"waits_with_clear_shot", Lua_MonsterType_Set_Flag<_monster_waits_with_clear_shot>},
519523 {0, 0}
520524 };
521525
--- marathon/trunk/Source_Files/Misc/Console.cpp (revision 514)
+++ marathon/trunk/Source_Files/Misc/Console.cpp (revision 515)
@@ -258,7 +258,11 @@
258258 if (!game_is_networked || !NetAllowCarnageMessages() || !m_carnage_messages_exist || projectile_index == -1) return;
259259
260260 // do some lookups
261- projectile_data *projectile = get_projectile_data(projectile_index);
261+ projectile_data *projectile = 0;
262+ if (projectile_index != NONE)
263+ {
264+ projectile = get_projectile_data(projectile_index);
265+ }
262266
263267 const std::string player_key = "%player%";
264268 const std::string aggressor_key = "%aggressor%";
--- marathon/trunk/docs/Lua.html (revision 514)
+++ marathon/trunk/docs/Lua.html (revision 515)
@@ -2666,8 +2666,12 @@
26662666 <dt>MonsterTypes[monster_type]</dt>
26672667 <dd><dl>
26682668 <dt>
2669- .cannot_be_dropped <span class="version">SVN</span>
2669+ .attacks_immediately <span class="version">20120128</span>
26702670 </dt>
2671+<dd><p class="description">monster will try an attack immediately</p></dd>
2672+ <dt>
2673+ .cannot_be_dropped <span class="version">20120128</span>
2674+</dt>
26712675 <dd><p class="description">monster cannot be skipped during placement</p></dd>
26722676 <dt>
26732677 .class</dt>
@@ -2700,7 +2704,7 @@
27002704 .item</dt>
27012705 <dd><p class="description">type of item the monster drops when it dies</p></dd>
27022706 <dt>
2703- .major <span class="version">SVN</span>
2707+ .major <span class="version">20120128</span>
27042708 </dt>
27052709 <dd><p class="description">monster is major</p></dd>
27062710 <dt>
@@ -2712,7 +2716,7 @@
27122716 </dt>
27132717 <dd><p class="description">minimum number of this type of monster in the level</p></dd>
27142718 <dt>
2715- .minor <span class="version">SVN</span>
2719+ .minor <span class="version">20120128</span>
27162720 </dt>
27172721 <dd><p class="description">monster is minor</p></dd>
27182722 <dt>
@@ -2743,6 +2747,10 @@
27432747 .weaknesses[damage type]
27442748 </dt>
27452749 <dd><p class="description">whether monster type has a weakness to damage type</p></dd>
2750+ <dt>
2751+ .waits_with_clear_shot <span class="version">20120128</span>
2752+</dt>
2753+<dd><p class="description">monster will sit and fire if he has a clear shot</p></dd>
27462754
27472755
27482756
旧リポジトリブラウザで表示