• Advertisement

_Vicious_

Member
  • Content count

    190
  • Joined

  • Last visited

Community Reputation

330 Neutral

About _Vicious_

  • Rank
    Member
  1. Deprecation warning for application-registered entities

    My first idea would be to check the reference count of such objects and print a warning if they exceed 1 (I'm assuming that one reference is reserved for the engine).
  2. Go-inspired features in Angelscript

    Not quite true in case of Go, which features different syntax for short variable declaration and assignment.   a := 0 // declares a variable 'a' and sets it's value to 0, same as 'auto a = 0' a = 0 // sets value of variable 'a' to 0 b = 0 // produces compiler error because assignment only works for variables that have already been declared in this scope
  3. Go-inspired features in Angelscript

    The same kind of argument applies to 'auto', which found its way into AngelScript nonetheless.     I believe you are wrong here. I find it that polluting the code with structs and classes that do not serve any purpose other than storing the return values for non-trivial functions is very much an anti-pattern. You can't have too many of them without making a mess.     Again, this is debatable. I would think that the same kind of argument applies to structs or classes (having to remember which class member corresponds to what).     Overall, it seems to me that neither of you have ever tried go lang, which I recommend you should do. I know you love your C++ but c'mon, there are other languages and technologies out there.
  4. Go-inspired features in Angelscript

    Could you please elaborate on what kind of bugs you think are possible with such approach to variable declaration?
  5. Go-inspired features in Angelscript

    Hi Andreas,   thanks for your continued work on the wonderful language!   I have recently gotten my feet considerably wet with Golang and have found some of its features pretty cool and useful, multiple return values and short variable declarations to name a few. Now I would consider the former to be somewhat more difficult to implement than the later, which seems to be a little more than syntax sugar for the 'auto' declaration.   Is there a chance you would consider implementing some of these features in AngelScript? Now I'm aware your TODO list is already miles long but I figured I'd ask you anyway :)   Best regards, Victor
  6. Windows XP Compatibility

    It's pretty much the same with CreateSemaphoreEx:   http://www.warsow.net/forum/thread/t/223185#post-223185
  7. Implicit conversion changed sign of value

    Confirming as the issue as fixed. Thanks!
  8. Implicit conversion changed sign of value

    void item_weapon( Entity @ent ) { if( (ent.spawnFlags & WEAPON_ROCKET) == WEAPON_ROCKET ) { if( (ent.spawnFlags & WEAPON_BIG) == WEAPON_BIG ) GENERIC_SpawnItem( ent, AMMO_ROCKETS ); else GENERIC_SpawnItem( ent, AMMO_WEAK_ROCKETS ); } else if( (ent.spawnFlags & WEAPON_SPIKES) == WEAPON_SPIKES ) { if( (ent.spawnFlags & WEAPON_BIG) == WEAPON_BIG ) GENERIC_SpawnItem( ent, AMMO_PLASMA ); else GENERIC_SpawnItem( ent, AMMO_WEAK_PLASMA ); } else if( (ent.spawnFlags & WEAPON_SHOTGUN) == WEAPON_SHOTGUN ) { if( (ent.spawnFlags & WEAPON_BIG) == WEAPON_BIG ) GENERIC_SpawnItem( ent, AMMO_SHELLS ); else GENERIC_SpawnItem( ent, AMMO_WEAK_SHELLS ); } } Basically, each '(ent.spawnFlags & WEAPON_ROCKET) == WEAPON_ROCKET'-style comparison throughout the source code results in compilation error.   WEAPON_ROCKET again is an enum, spawnflags is an integer property.
  9. Implicit conversion changed sign of value

    Hm, after updating to WIP Angelscript version, I get loads of the following errors:
  10. Andreas,   are there any plans to incorporate this into 2.28.2? The patches have already started to bitrot...     Best regards, Victor
  11. Implicit conversion changed sign of value

    Thank you :)
  12. Implicit conversion changed sign of value

    Hi Andreas,   did you have the chance to look into the problem? I know it's kinda minor but still rather annoying :)
  13. Implicit conversion changed sign of value

    ok, thanks!
  14. Hi Andreas,   here I am again with another question :)   The following code produces a warning which says "Implicit conversion changed sign of value":         if ( ( G_PointContents( spawn.origin ) & CONTENTS_NODROP ) != 0 ) ...   G_PointContents's declaration is:   int G_PointContents( const Vec3 &in origin )   and CONTENTS_NODROP is an enum. Changing the line to read:   if ( ( G_PointContents( spawn.origin ) & uint( CONTENTS_NODROP ) ) != 0 )   fixes the warning. Why casting an enum to unsigned int fixes the warning, while G_PointContents is obviously a signed integer?
  15. Builtin range/collection type

    It appears to me that deleting or inserting an element in collection preceeding the iterator internal pointer should increment or decrement the pointer accordingly. Iterator should also hold reference to the collection and the currently pointed element too if it's refcounted. Nothing else has come to my mind so far.
  • Advertisement