pixeltailgames / cinema

:movie_camera: Gamemode for Garry's Mod featuring multiplayer video streaming
http://www.pixeltailgames.com/cinema/
87 stars 63 forks source link

Added support for Chronological Queue Mode in cl_queue's SortVideos() #17

Closed WinterPhoenix closed 11 years ago

samuelmaddock commented 11 years ago

Ah, this is something I had overlooked when I implemented queue modes. One thing about your code, is there any reason you didn't use the actual enums? They're shared in the global scope.

WinterPhoenix commented 11 years ago

Oh...So they are. I thought they were only Server-side. I could change that in my Commit if you'd like.

samuelmaddock commented 11 years ago

I think that would be best.

WinterPhoenix commented 11 years ago

Fixed.

samuelmaddock commented 11 years ago

One more thing, you need to change your logic to handle the case when the queue mode is chronological and then handle all other cases.

if queueMode == QUEUE_CHRONOLOGICAL then
    -- handle chronological sort
else
    -- handle vote sort and all other cases
end

The reason for this is that users may accidentally enter an invalid queue mode for the convar. If that's the case, we still need to do something.

WinterPhoenix commented 11 years ago

Does that look suitable?

samuelmaddock commented 11 years ago

Looks good, thanks. :+1: